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 111 discussion

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

A development team manages website deployments using AWS CodeDeploy blue/green deployments. The application is running on Amazon EC2 instances behind an Application Load Balancer in an Auto Scaling group.

When deploying a new revision, the team notices the deployment eventually fails, but it takes a long time to fail. After further inspection, the team discovers the AllowTraffic lifecycle event ran for an hour and eventually failed without providing any other information. The team wants to ensure failure notices are delivered more quickly while maintaining application availability even upon failure.

Which combination of actions should be taken to meet these requirements? (Choose two.)

  • A. Change the deployment configuration to CodeDeployDefault.AllAtOnce to speed up the deployment process by deploying to all of the instances at the same time.
  • B. Create a CodeDeploy trigger for the deployment failure event and make the deployment fail as soon as a single health check failure is detected.
  • C. Reduce the HealthCheckIntervalSeconds and UnhealthyThresholdCount values within the target group health checks to decrease the amount of time it takes for the application to be considered unhealthy.
  • D. Use the appspec.yml file to run a script on the AllowTraffic hook to perform lighter health checks on the application instead of making CodeDeploy wait for the target group health checks to pass.
  • E. Use the appspec.yml file to run a script on the BeforeAllowTraffic hook to perform health checks on the application and fail the deployment if the health checks performed by the script are not successful.
Show Suggested Answer Hide Answer
Suggested Answer: BE 🗳️

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
nsvijay04b1
Highly Voted 2 years, 6 months ago
Selected Answer: BE
A - disaster C - wrong - already reached AllowTraffic lifecycle event that means it is not taking time in ValidateService event, problem is in health check itself. B/E - correct Between D/E, why E? AllowTraffic - u cannot run scripts, it belongs to codedeploy BeforeAllowTraffic – You can use this deployment lifecycle event to run tasks on instances before they are registered with a load balancer. AllowTraffic – During this deployment lifecycle event, internet traffic is allowed to access instances after a deployment. This event is reserved for the CodeDeploy agent and cannot be used to run scripts.
upvoted 10 times
...
4b18f59
Most Recent 8 months, 3 weeks ago
CE seems to be correct
upvoted 1 times
...
sub_kutu
2 years, 2 months ago
ChatGPT said CE C. Reduce the HealthCheckIntervalSeconds and UnhealthyThresholdCount values within the target group health checks to decrease the amount of time it takes for the application to be considered unhealthy. This will make the target group health checks more sensitive to application health changes, which will result in quicker detection of application issues.
upvoted 2 times
...
bgc1
2 years, 3 months ago
Selected Answer: BE
I was confused between B and C but after reading more about BeforeAllowTraffic hook, its clear now. For ec2 which is relevant for our question --> You can use this deployment lifecycle event to run tasks on instances before they are registered with a load balancer. This means script mentioned in option E is run on each ec2. Hence option B is suitable one where we need to fail deployment as soon as check fails on any 1 ec2. If we had ECS then option C would have applied because BeforeAllowTraffic - Used to run tasks after the second target group is associated with the replacement task set, but before traffic is shifted to the replacement task set. The results of a hook function at this lifecycle event can trigger a rollback. refer https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#reference-appspec-file-structure-hooks-list
upvoted 2 times
...
vinca0121
2 years, 3 months ago
Piccaso makes me confused...really
upvoted 4 times
...
Piccaso
2 years, 4 months ago
Selected Answer: BD
A is not good for an error has been located in a specific step. C, reduce time interval and threshold count can have biased error E, BeforeAllowTraffic does not match the scenario.
upvoted 1 times
BelloMio
2 years, 4 months ago
You cannot edit or create scripts for the AllowTraffic hook
upvoted 1 times
...
...
Bulti
2 years, 4 months ago
Selected Answer: BE
B and E is correct. B because of the use of CodeDeploy trigger- You can create a trigger that publishes an Amazon Simple Notification Service (Amazon SNS) topic for a AWS CodeDeploy deployment or instance event. Then, when that event occurs, all subscribers to the associated topic receive notifications through the endpoint specified in the topic, such as an SMS message or email message. Amazon SNS offers multiple methods for subscribing to topics. E over D because you need to execute a script before you allow traffic and moreover we cannot intercept and write any custom script in the AfterAllowTraffic event since its reserved for CodeDeploy.
upvoted 3 times
...
Oleg_gol
2 years, 5 months ago
Selected Answer: BE
https://www.examtopics.com/discussions/amazon/view/53194-exam-aws-devops-engineer-professional-topic-1-question-534/
upvoted 1 times
...
Imstack
2 years, 5 months ago
BE !!!!!
upvoted 1 times
...
SatenderRathee
2 years, 6 months ago
Selected Answer: CE
To quickly deliver failure notices while maintaining application availability, the team should: Use the appspec.yml file to run a script on the BeforeAllowTraffic hook to perform health checks on the application and fail the deployment if the health checks performed by the script are not successful. (E) Reduce the HealthCheckIntervalSeconds and UnhealthyThresholdCount values within the target group health checks to decrease the amount of time it takes for the application to be considered unhealthy. (C) By performing health checks on the BeforeAllowTraffic hook, the team can quickly determine if the deployment is successful or not, and fail the deployment if the health checks performed by the script are not successful. This will allow the team to receive failure notices more quickly while maintaining application availability.
upvoted 3 times
Piccaso
2 years, 4 months ago
Thanks for the E stuff.
upvoted 1 times
...
...
quixo
2 years, 6 months ago
BE for sure
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 ...