AWS Certified Solutions Architect – Professional (SAP-C02) — Question 24

A company has a serverless application comprised of Amazon CloudFront, Amazon API Gateway, and AWS Lambda functions. The current deployment process of the application code is to create a new version number of the Lambda function and run an AWS CLI script to update. If the new function version has errors, another CLI script reverts by deploying the previous working version of the function. The company would like to decrease the time to deploy new versions of the application logic provided by the Lambda functions, and also reduce the time to detect and revert when errors are identified.
How can this be accomplished?

Answer options

Correct answer: B

Explanation

Option B is correct because it employs AWS SAM and CodeDeploy to enable a gradual rollout of Lambda versions, allowing for traffic shifting and testing before fully committing, which minimizes downtime and quickly identifies issues. The other options either do not automate the rollback process effectively or do not incorporate traffic management and testing, leading to slower response times when errors are detected.