Q72 — AWS DOP-C02 Ch.2
Question 72 of 100 | ← Chapter 2
A company wants to migrate its legacy web application—currently hosted on Amazon EC2—to a serverless architecture. The company currently deploys the application using a new EC2 Auto Scaling group and a new Elastic Load Balancer, then uses Amazon Route 53 weighted routing policies to shift traffic gradually. For the new serverless application, the company plans to use Amazon API Gateway and AWS Lambda. The company will need to update its deployment process for the new application. Before rolling out new features to the entire customer base, it must retain the ability to test new features on a subset of customers. Which deployment strategy meets these requirements?
- A. Use AWS CDK to deploy API Gateway and Lambda functions. When code changes are needed, update the AWS CloudFormation stack and deploy new versions of the API and Lambda functions. Use Route 53 failover routing policy for canary release strategy.
- B. Use AWS CloudFormation to deploy API Gateway and Lambda functions with Lambda function versions. When code changes are needed, update the CloudFormation stack with new Lambda code and update the API version using canary release strategy. Promote the new version after testing completes. ✓
- C. Use AWS Elastic Beanstalk to deploy API Gateway and Lambda functions. When code changes are needed, deploy new versions of the API and Lambda functions. Use Elastic Beanstalk blue/green deployment to gradually shift traffic.
- D. Use AWS OpsWorks to deploy API Gateway at the service layer and Lambda functions at a custom layer. When code changes are needed, use OpsWorks to perform blue/green deployment and gradually shift traffic.
Correct Answer: B. Use AWS CloudFormation to deploy API Gateway and Lambda functions with Lambda function versions. When code changes are needed, update the CloudFormation stack with new Lambda code and update the API version using canary release strategy. Promote the new version after testing completes.
Explanation
Option B is correct. Using AWS CloudFormation to deploy API Gateway and Lambda functions, leveraging Lambda function versioning and canary release strategies to incrementally roll out new features, satisfies the requirement to retain testing capability on a subset of users while gradually promoting new features to all users.