Q16 — AWS DOP-C02 Ch.1

Question 16 of 100 | ← Chapter 1

A company developed an AWS Lambda function to process orders received via an HTTP API. It uses AWS CodeDeploy to deploy the Lambda function as the final stage of its CI/CD pipeline. A DevOps engineer observed intermittent failures in the order API during the first few seconds after deployment. Investigation revealed failures occurred because database schema migrations had not yet fully propagated before Lambda invocations began.

Correct Answer: A. Add a BeforeAllowTraffic hook to the AppSpec file to test for and wait until necessary database changes are complete before routing traffic to the new Lambda function version.

Explanation

https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-file-structure-hooks-lambda