DevOps Engineering on AWS Certification DevOps Engineering on AWS Certification MCQ 4 — Questions and Answers
Question 1: A DevOps engineer configures an Amazon CloudWatch alarm on a custom metric published by an EC2 Auto Scaling group. The alarm should trigger a scale-out action. Which component executes the scaling action when the alarm fires?
- AWS Lambda function subscribed to an SNS topic
- An Auto Scaling scaling policy linked to the CloudWatch alarm (Correct answer)
- An EventBridge rule targeting the Auto Scaling group
- A Systems Manager Automation runbook
Correct answer: An Auto Scaling scaling policy linked to the CloudWatch alarm
Auto Scaling scaling policies are directly linked to CloudWatch alarms and execute the scale-out or scale-in action when the alarm threshold is breached.
Question 2: Which type of AWS CodeDeploy deployment terminates old instances only after traffic has been shifted to new instances and validation tests pass?
- In-place deployment
- Blue/green deployment (Correct answer)
- Rolling deployment
- Canary deployment
Correct answer: Blue/green deployment
Blue/green deployments provision a new set of instances (green), shift traffic to them, and only terminate the original instances (blue) after successful validation.
Question 3: An engineering team uses AWS CodeArtifact to host internal npm packages. Which IAM action must be granted to allow a CI/CD pipeline to publish a new package version?
- codeartifact:GetPackageVersionReadme
- codeartifact:PublishPackageVersion (Correct answer)
- codeartifact:PutPackageMetadata
- codeartifact:DescribePackageVersion
Correct answer: codeartifact:PublishPackageVersion
The codeartifact:PublishPackageVersion IAM action grants permission to upload and publish new package versions to a CodeArtifact repository.
Question 4: A team wants to implement chaos engineering on AWS to test the resiliency of their application. Which AWS service or feature is most appropriate for injecting faults into SSM-managed EC2 instances?
- AWS Fault Injection Simulator (FIS) (Correct answer)
- Amazon CloudWatch Synthetics
- AWS Resilience Hub
- Amazon DevOps Guru
Correct answer: AWS Fault Injection Simulator (FIS)
AWS Fault Injection Simulator runs controlled fault injection experiments on AWS resources including EC2, ECS, EKS, and RDS to validate application resiliency.
Question 5: Which CloudFormation feature allows a DevOps engineer to preview the changes that will be made to a stack before executing an update?
- Stack drift detection
- Change sets (Correct answer)
- Stack policies
- CloudFormation Guard
Correct answer: Change sets
Change sets let you preview how proposed changes to a CloudFormation template will affect existing stack resources before you execute the update.
Question 6: A microservice deployed on AWS Lambda needs to process messages from Amazon SQS. What is the recommended integration pattern to invoke the Lambda function?
- Schedule a CloudWatch Events rule to poll SQS every minute
- Configure SQS as an event source mapping on the Lambda function (Correct answer)
- Use SNS to fan out SQS messages to Lambda subscriptions
- Deploy an EC2 instance that polls SQS and calls the Lambda API
Correct answer: Configure SQS as an event source mapping on the Lambda function
Lambda event source mappings poll SQS on your behalf and automatically invoke the function with batches of messages, handling retries and concurrency natively.
Question 7: A DevOps engineer needs to ensure that an Auto Scaling group replaces unhealthy instances automatically based on application-level health checks, not just EC2 status checks. Which configuration achieves this?
- Enable detailed monitoring on the Auto Scaling group
- Set the health check type to ELB on the Auto Scaling group (Correct answer)
- Configure a CloudWatch alarm on StatusCheckFailed_System
- Enable instance refresh with a health check grace period of zero
Correct answer: Set the health check type to ELB on the Auto Scaling group
Setting the Auto Scaling health check type to ELB makes the group use the load balancer's target health checks, which reflect application-level health, not just EC2 system status.
A DevOps engineer configures an Amazon CloudWatch alarm on a custom metric published by an EC2 Auto Scaling group.
The alarm should trigger a scale-out action.
Which component executes the scaling action when the alarm fires?