exam questions

Exam AWS Certified DevOps Engineer - Professional DOP-C02 All Questions

View all questions & answers for the AWS Certified DevOps Engineer - Professional DOP-C02 exam

Exam AWS Certified DevOps Engineer - Professional DOP-C02 topic 1 question 91 discussion

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 noticed 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 is invoked.

How should the DevOps engineer overcome this?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Gomer
Highly Voted 11 months, 1 week ago
Selected Answer: A
In my research, there are only TWO CodeDeploy AppSpec ifecycle event hooks for Lambda deployment: BeforeAllowTraffic # Use to run tasks before traffic is shifted to the deployed Lambda function version. AfterAllowTraffic # Use to run tasks after all traffic is shifted to the deployed Lambda function version. A: (YES) Don't redirect traffic untill ready B: (NO) Block traffic until ready C: (NO) Event hook N/A for Lambda D: (NO) Event hook N/A for Lambda
upvoted 5 times
...
thanhnv142
Highly Voted 1 year, 3 months ago
A is correct: <using AWS CodeDeploy to deploy> and <a CI/CD pipeline> means lifecycle event hook B: AfterAllowTraffic wont solve the problem, we need to hook before traffic is allowed, as in <not having fully propagated before the Lambda function is invoked> C: beforeInstall is used to prepare for the installation process, so it is not relevant D: there is no ValidateService hook
upvoted 5 times
...
seetpt
Most Recent 1 year ago
Selected Answer: A
I think A
upvoted 1 times
...
jojom19980
1 year, 2 months ago
Selected Answer: A
D can be correct if there is a wait to database to be ready so I will go with A
upvoted 3 times
...
habros
1 year, 10 months ago
"Hooks": [ { "BeforeInstall": "BeforeInstallHookFunctionName" }, { "AfterInstall": "AfterInstallHookFunctionName" }, { "AfterAllowTestTraffic": "AfterAllowTestTrafficHookFunctionName" }, { "BeforeAllowTraffic": "BeforeAllowTrafficHookFunctionName" }, { "AfterAllowTraffic": "AfterAllowTrafficHookFunctionName" } ] }
upvoted 3 times
habros
1 year, 10 months ago
Opting for A based on this
upvoted 2 times
HugoFM
1 year, 5 months ago
Those hooks are not valid for a Lambda, see the doc. Lambda only supports BeforeAllowTraffic and AfterAllowTraffic. Anyway the answer is A
upvoted 6 times
...
...
...
[Removed]
1 year, 11 months ago
Selected Answer: A
A is make sense
upvoted 3 times
...
OrganizedChaos25
2 years ago
A is the right answer
upvoted 2 times
...
devnv
2 years ago
A is correct
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago