AWS Certified Developer – Associate (DVA-C02) — Question 133
A company is developing a serverless application that consists of various AWS Lambda functions behind Amazon API Gateway APIs. A developer needs to automate the deployment of Lambda function code. The developer will deploy updated Lambda functions with AWS CodeDeploy. The deployment must minimize the exposure of potential errors to end users. When the application is in production, the application cannot experience downtime outside the specified maintenance window.
Which deployment configuration will meet these requirements with the LEAST deployment time?
Answer options
- A. Use the AWS CodeDeploy in-place deployment configuration for the Lambda functions. Shift all traffic immediately after deployment.
- B. Use the AWS CodeDeploy linear deployment configuration to shift 10% of the traffic every minute.
- C. Use the AWS CodeDeploy all-at-once deployment configuration to shift all traffic to the updated versions immediately.
- D. Use the AWS CodeDeploy predefined canary deployment configuration to shift 10% of the traffic immediately and shift the remaining traffic after 5 minutes.
Correct answer: D
Explanation
The correct answer is D because using the canary deployment configuration allows for a small percentage of traffic to be shifted initially, minimizing user exposure to potential errors, while still enabling a quick rollback if issues arise. Options A and C are not suitable as they could cause immediate exposure to errors, and option B takes too long to fully shift traffic, which does not meet the requirement for least deployment time.