exam questions

Exam AWS DevOps Engineer Professional All Questions

View all questions & answers for the AWS DevOps Engineer Professional exam

Exam AWS DevOps Engineer Professional topic 1 question 8 discussion

Exam question from Amazon's AWS DevOps Engineer Professional
Question #: 8
Topic #: 1
[All AWS DevOps Engineer Professional Questions]

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 begins executing.
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
otsu
Highly Voted 3 years, 8 months ago
should be A https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda
upvoted 14 times
...
xlFireman
Highly Voted 3 years, 7 months ago
A - Correct B - Does not fit into the frame of the question. We want the database to be up and running BEFORE we start serving production traffic. C - Not applicable in the appspec.yml file for Lambda D - Same explanation as C
upvoted 9 times
...
xhi158
Most Recent 1 year, 6 months ago
To overcome the issue of intermittent failures of the ordering API for a few seconds after deployment, the DevOps Engineer should 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 1. This will ensure that the database changes have fully propagated before the Lambda function begins executing. So the answer is A
upvoted 2 times
...
hp298
2 years, 2 months ago
Selected Answer: A
A is the answer
upvoted 1 times
...
Bulti
2 years, 5 months ago
A is correct
upvoted 1 times
...
dangdoan
2 years, 9 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
idforadf
3 years, 7 months ago
AWS Lambda deployment allows only 2 hooks i.e. BeforeAllowTraffic & AfterAllowTraffic . So options C and D are ruled out.
upvoted 6 times
...
jackdryan
3 years, 7 months ago
I'll go with A
upvoted 4 times
peddyua
3 years, 7 months ago
I see what you’re doing there kid
upvoted 1 times
...
...
ChauPhan
3 years, 8 months ago
A is correct. Other options is not for Lambda
upvoted 1 times
...
cybe001
3 years, 8 months ago
A is correct
upvoted 1 times
...
leotoras
3 years, 8 months ago
A is correct.
upvoted 1 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 ...