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

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

A developer is maintaining a fleet of 50 Amazon EC2 Linux servers. The servers are part of an Amazon EC2 Auto Scaling group, and also use Elastic Load Balancing for load balancing.

Occasionally, some application servers are being terminated after failing ELB HTTP health checks. The developer would like to perform a root cause analysis on the issue, but before being able to access application logs, the server is terminated.

How can log collection be automated?

  • A. Use Auto Scaling lifecycle hooks to put instances in a Pending:Wait state. Create an Amazon CloudWatch alarm for EC2 Instance Terminate Successful and trigger an AWS Lambda function that invokes an SSM Run Command script to collect logs, push them to Amazon S3, and complete the lifecycle action once logs are collected.
  • B. Use Auto Scaling lifecycle hooks to put instances in a Terminating:Wait state. Create an AWS Config rule for EC2 instance-terminate Lifecycle Action and trigger a step function that invokes a script to collect logs, push them to Amazon S3, and complete the lifecycle action once logs are collected.
  • C. Use Auto Scaling lifecycle hooks to put instances in a Terminating:Wait state. Create an Amazon CloudWatch subscription filter for EC2 Instance Terminate Successful and trigger a CloudWatch agent that invokes a script to collect logs, push them to Amazon S3, and complete the lifecycle action once logs are collected.
  • D. Use Auto Scaling lifecycle hooks to put instances in a Terminating:Wait state. Create an Amazon EventBridge rule for EC2 Instance-terminate Lifecycle Action and trigger an AWS Lambda function that invokes an SSM Run Command script to collect logs, push them to Amazon S3, and complete the lifecycle action once logs are collected.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
saggy4
Highly Voted 2 years, 4 months ago
Selected Answer: D
A -- Pending Wait state is when the instance is created B -- AWS Config has no such rule C -- You cannot trigger a Cloudwatch agent D -- Correct
upvoted 9 times
...
Piccaso
Most Recent 2 years, 3 months ago
Selected Answer: C
A must be eliminated because of "Pending:Wait State" C looks best, stick to CloudWatch
upvoted 1 times
Mark1000
2 years, 2 months ago
Cant be C CW subscription filters only Kinesis, Kinesis Firehorse, Lambda and Opensearch Correct answer is D
upvoted 3 times
Piccaso
2 years, 2 months ago
Agree. I am walking through the questions one more time. C must be wrong.
upvoted 1 times
devnv
2 years ago
Please don't confuse others.
upvoted 1 times
...
...
...
...
Bulti
2 years, 3 months ago
Selected Answer: D
D is correct.
upvoted 1 times
...
Oleg_gol
2 years, 3 months ago
Selected Answer: D
https://www.examtopics.com/discussions/amazon/view/8042-exam-aws-devops-engineer-professional-topic-1-question-55/
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago