Q13 — AWS DOP-C02 Ch.1
Question 13 of 100 | ← Chapter 1
A DevOps engineer is building a CI/CD pipeline for a serverless application using AWS Lambda functions. The company wants to minimize customer impact from failed deployments and also monitor for issues.
- A. Define the serverless application using an AWS Serverless Application Model (AWS SAM) template. Deploy the Lambda function using AWS CodeDeploy with the Canary10Percent15Minutes deployment preference type. Use Amazon CloudWatch alarms to monitor function health. ✓
- B. Use AWS CloudFormation to deploy stack updates and include Amazon CloudWatch alarms on all resources. Set up an AWS CodePipeline approval action for developers to validate and approve AWS CloudFormation change sets.
- C. Use AWS CloudFormation to publish new versions on every stack update and include Amazon CloudWatch alarms on all resources. Use the RoutingConfig property of the AWS::Lambda::Alias resource to update traffic routing during stack updates.
- D. Use AWS CodeBuild to add test event payloads for the Lambda function. Publish a new version of the function and include Amazon CloudWatch alarms. Update the production alias to point to the new version. Configure rollback to occur when alarms enter the ALARM state.
Correct Answer: A. Define the serverless application using an AWS Serverless Application Model (AWS SAM) template. Deploy the Lambda function using AWS CodeDeploy with the Canary10Percent15Minutes deployment preference type. Use Amazon CloudWatch alarms to monitor function health.
Explanation
Option A satisfies the requirements. The AWS Serverless Application Model (AWS SAM) template defines serverless applications declaratively. AWS CodeDeploy with the Canary10Percent15Minutes deployment preference enables gradual, low-risk traffic shifting—minimizing blast radius of failed deployments. Amazon CloudWatch alarms provide real-time health monitoring and alerting. Other options lack native, integrated canary deployment capabilities or introduce manual intervention (B), complex routing logic (C), or incomplete rollback automation (D). Thus, A is the correct answer.