You have created a mobile app that allows users to rate and review hotels they have stayed on. The app is hosted on Docker containers deployed on Amazon ECS. You need to run validation scripts for new deployments to determine if the application is working as expected before allowing production traffic to flow to the new app version. You also want to configure automatic rollback if the validation is not successful.
Which of the following options will you do to implement this validation?
The correct answer is:
Create your validation scripts in AWS Lambda and define them on the AfterAllowTestTraffic lifecycle hook of the AppSpec.yaml file. The functions can validate the deployment using the test traffic and rollback if the tests fail.
It is true that Lambda doesn’t have an AfterAllowTestTraffic lifecycle hook. However, take note that this scenario is an ECS deployment, not a Lambda deployment.
The Lambda function here is only used as a validation script for the AfterAllowTestTraffic lifecycle hook. and not as a For more information about this, please visit: