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

A production account has a requirement that any Amazon EC2 instance that has been logged in to manually must be terminated within 24 hours. All applications in the production account are using Auto Scaling groups with the Amazon CloudWatch Logs agent configured.
How can this process be automated?

  • A. Create a CloudWatch Logs subscription to an AWS Step Functions application. Configure an AWS Lambda function to add a tag to the EC2 instance that produced the login event and mark the instance to be decommissioned. Create an Amazon EventBridge rule to invoke a second Lambda function once a day that will terminate all instances with this tag.
  • B. Create an Amazon CloudWatch alarm that will be invoked by the login event. Send the notification to an Amazon Simple Notification Service (Amazon SNS) topic that the operations team is subscribed to, and have them terminate the EC2 instance within 24 hours.
  • C. Create an Amazon CloudWatch alarm that will be invoked by the login event. Configure the alarm to send to an Amazon Simple Queue Service (Amazon SQS) queue. Use a group of worker instances to process messages from the queue, which then schedules an Amazon EventBridge rule to be invoked.
  • D. Create a CloudWatch Logs subscription to an AWS Lambda function. Configure the function to add a tag to the EC2 instance that produced the login event and mark the instance to be decommissioned. Create an Amazon EventBridge rule to invoke a daily Lambda function that terminates all instances with this tag.
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
Aesthet
8 months, 3 weeks ago
Opion D: "with this tag" So, there will be one tag, like ShoudTerminate: true. But by doing so we will terminate ALL instances with a tag - even those created 10 minutes ago. It doesn't seem correct, or am I missing something?
upvoted 1 times
...
fuzzycom
10 months, 1 week ago
D is best answer. hint: question includes "~~Amazon CloudWatch Logs agent configured" Lambda function is keyword.
upvoted 1 times
...
thanhnv142
1 year, 3 months ago
D is correct: A: If using step function, no need to include "Amazon EventBridge rule to invoke a second Lambda function" B: With this method, policy-breaching Ec2 would be terminated manually, which cannot ensure that they are terminated within 24 hours C: no mention of terminating the instances
upvoted 4 times
...
imymoco
1 year, 4 months ago
D is correct; with B, SNS can cause delays.
upvoted 2 times
...
madperro
1 year, 10 months ago
Selected Answer: D
D is the best answer.
upvoted 1 times
...
haazybanj
2 years ago
Selected Answer: D
D. Create a CloudWatch Logs subscription to an AWS Lambda function. Configure the function to add a tag to the EC2 instance that produced the login event and mark the instance to be decommissioned. Create an Amazon EventBridge rule to invoke a daily Lambda function that terminates all instances with this tag.
upvoted 3 times
...
alce2020
2 years ago
Selected Answer: D
D is the correct answer
upvoted 3 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