
Ultimate access to all questions.
A company has implemented an AWS Lambda function to process orders via an API, utilizing AWS CodeDeploy for the final deployment stage in their CI/CD pipeline. The DevOps team has observed occasional API failures shortly post-deployment, hypothesizing that these are caused by the Lambda function being invoked before database updates are fully integrated. What strategy should the DevOps engineer employ to prevent these failures by ensuring that database changes are fully propagated prior to the Lambda function's invocation?
A
Add a BeforeAllowTraffic hook to the AppSpec file that tests and waits for any necessary database changes before traffic can flow to the new version of the Lambda function.
B
Add an AfterAllowTraffic hook to the AppSpec file that forces traffic to wait for any pending database changes before allowing the new version of the Lambda function to respond.
C
Add a BeforeInstall hook to the AppSpec file that tests and waits for any necessary database changes before deploying the new version of the Lambda function.
D
Add a ValidateService hook to the AppSpec file that inspects incoming traffic and rejects the payload if dependent services, such as the database, are not yet ready.