A developer is updating a critical serverless backend API hosted on AWS Lambda by configuring traffic shifting using AWS SAM and AWS CodeDeploy. The deployment must adhere to the following requirements:
1. Traffic must be routed to the new version in a linear, step-by-step progression rather than a single large step-up after an initial canary window.
2. The entire deployment must complete, routing 100% of traffic to the new version, in less than 15 minutes.
3. The deployment must automatically roll back if a CloudWatch alarm is triggered.
Which CodeDeploy deployment configuration should the developer specify in the SAM template's DeploymentPreference section to satisfy these requirements?
- ACanary10Percent10Minutes
- BLinear10PercentEvery2Minutes
- Linear10PercentEvery1MinuteAnswer
- DAllAtOnce
Answer
Linear10PercentEvery1Minute
The configuration that increments traffic by 10% every minute is the only option that is linear (providing a step-by-step progression rather than a sudden shift) and completes the deployment within the 15-minute constraint, taking 9 minutes in total.
Step-by-Step Solution
Key Concept
AWS CodeDeploy built-in deployment configurations for AWS Lambda and SAM allow developers to choose between linear and canary traffic shifting. Calculating the total deployment duration (number of steps multiplied by the interval) is critical to meeting deployment time SLAs.
Estimated Time:2m 0s