DOP-C02 · Question #79
A company has developed an AWS Lambda function that handles orders received through an API. The company is using AWS CodeDeploy to deploy the Lambda function as the final stage of a CI/CD pipeline. A
The correct answer is A. Add a BeforeAllowTraffic hook to the AppSpec file that tests and waits for any necessary. There are three hooks for Lamda AppSpec. BeforeAllowTraffic, AllowTraffic and AfterAllowTraffic. https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure- hooks.html#appspec-hooks-lambda
Question
A company has developed an AWS Lambda function that handles orders received through an API. The company is using AWS CodeDeploy to deploy the Lambda function as the final stage of a CI/CD pipeline. A DevOps Engineer has notices there are intermittent failures of the ordering API for a few seconds after deployment. After some investigation, the DevOps Engineer believes the failures are due to database changes not having fully propagated before the lambda function begins executing. How should the DevOps Engineer overcome this?
Options
- AAdd a BeforeAllowTraffic hook to the AppSpec file that tests and waits for any necessary
- BAdd an AfterAllowTraffic hook to the AppSpec file that forces traffic to wait for any pending
- CAdd a BeforeInstall hook to the AppSpec file that tests and waits for any necessary database
- DAdd a ValidateService hook to the AppSpec file that inspects incoming traffic and rejects the
How the community answered
(18 responses)- A72% (13)
- B6% (1)
- C6% (1)
- D17% (3)
Explanation
There are three hooks for Lamda AppSpec. BeforeAllowTraffic, AllowTraffic and AfterAllowTraffic. https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure- hooks.html#appspec-hooks-lambda
Topics
Community Discussion
No community discussion yet for this question.