AWS DevOps High Availability 3 — Questions and Answers
Question 1: A CloudFormation stack update fails midway through and needs to roll back. Which resource types may NOT be automatically rolled back by CloudFormation?
- EC2 instances and security groups
- S3 buckets with data and some stateful resources like RDS with deletion policies (Correct answer)
- IAM roles and policies
- Lambda functions and CloudWatch alarms
Correct answer: S3 buckets with data and some stateful resources like RDS with deletion policies
S3 buckets containing objects and RDS instances with Retain deletion policies cannot be automatically deleted during rollback, leaving partial state.
Question 2: Which ALB feature helps maintain high availability by routing requests away from unhealthy targets without any DNS changes?
- Sticky sessions with application-based cookies
- Target group health checks with automatic deregistration of unhealthy targets (Correct answer)
- Cross-zone load balancing with weighted target groups
- ALB access logs with CloudWatch metric filters
Correct answer: Target group health checks with automatic deregistration of unhealthy targets
ALB continuously performs health checks and stops routing traffic to unhealthy targets, automatically recovering when targets pass health checks again.
Question 3: A DevOps engineer needs to implement a canary deployment for a Lambda function to validate a new version before full cutover. Which feature supports this natively?
- Lambda layers with version pinning
- Lambda aliases with weighted traffic shifting between versions (Correct answer)
- Lambda reserved concurrency with gradual increase
- Lambda provisioned concurrency with blue/green switching
Correct answer: Lambda aliases with weighted traffic shifting between versions
Lambda aliases support traffic shifting by assigning weights between two versions, enabling canary or linear deployment strategies natively.
Question 4: An SQS queue is used to decouple a producer and consumer. What configuration prevents message loss if the consumer service becomes temporarily unavailable?
- Enable long polling and set VisibilityTimeout to 0
- Configure a Dead Letter Queue (DLQ) and set appropriate message retention period (Correct answer)
- Use FIFO queues with content-based deduplication
- Enable SQS delay queues with a 15-minute delay
Correct answer: Configure a Dead Letter Queue (DLQ) and set appropriate message retention period
A DLQ captures messages that fail processing after maximum retries, while message retention period keeps messages available during consumer downtime.
Question 5: Which EC2 Auto Scaling policy type is most appropriate for predictably increasing traffic patterns, such as a daily business hours spike?
- Target tracking scaling policy
- Step scaling policy
- Scheduled scaling action (Correct answer)
- Simple scaling policy with cooldown periods
Correct answer: Scheduled scaling action
Scheduled scaling actions preemptively scale out before a known traffic increase, avoiding latency from reactive scaling during the spike.
Question 6: A stateful application requires session persistence across multiple EC2 instances behind an ALB. Which solution maintains high availability without a single point of failure?
- Enable ALB sticky sessions with duration-based cookies
- Store sessions in ElastiCache Redis with Multi-AZ replication enabled (Correct answer)
- Use NFS-mounted EFS for shared session storage
- Store sessions on an EC2 instance with scheduled snapshots
Correct answer: Store sessions in ElastiCache Redis with Multi-AZ replication enabled
ElastiCache Redis with Multi-AZ stores sessions externally and replicates them, allowing any EC2 instance to serve any user without sticky routing.
Question 7: In AWS CodePipeline, which action type can be used to implement a manual approval gate before deploying to production, ensuring human review?
- Invoke action using Lambda
- Manual approval action in an Approval action group (Correct answer)
- Test action using CodeBuild
- Source action with webhook trigger
Correct answer: Manual approval action in an Approval action group
CodePipeline's manual approval action pauses the pipeline and sends notifications via SNS, requiring a designated approver to proceed.
A CloudFormation stack update fails midway through and needs to roll back.
Which resource types may NOT be automatically rolled back by CloudFormation?