Which deploy stage configuration will meet these requirements?
Use an AWS Serverless Application Model (AWS SAM) template to define the serverless application. Use AWS CodeDeploy to deploy the Lambda functions with the Canary10Percent15Minutes Deployment Preference Type. Use Amazon CloudWatch alarms to monitor the health of the functions.
Use AWS CloudFormation to publish a new stack update, and include Amazon CloudWatch alarms on all resources. Set up an AWS CodePipeline approval action for a developer to verify and approve the AWS CloudFormation change set.
Use AWS CloudFormation to publish a new version on every stack update, and include Amazon CloudWatch alarms on all resources. Use the RoutingConfig property of the AWS:: Lambda:: Alias resource to update the traffic routing during the stack update.
Use AWS CodeBuild to add sample event payloads for testing to the Lambda functions. Publish a new version of the functions, and include Amazon CloudWatch alarms. Update the production alias to point to the new version. Configure rollbacks to occur when an alarm is in the ALARM state.
Explanations:
Using AWS SAM for deployment, AWS CodeDeploy with Canary10Percent15Minutes allows gradual traffic shifting, which minimizes impact in case of failure. CloudWatch alarms help monitor the functions’ health.
AWS CloudFormation and manual approval add unnecessary complexity and delay. This method lacks automated rollback or traffic routing control to reduce impact during failures.
While CloudFormation and CloudWatch alarms are useful, this option doesn’t address the gradual deployment and monitoring required to reduce customer impact during unsuccessful deployments.
While CodeBuild, CloudWatch alarms, and versioning are useful, it lacks traffic routing controls like those provided in option A, making it less effective for managing gradual rollouts and minimizing customer impact.