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

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

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

How can this process be automated?

  • A. Create a CloudWatch Logs subscription to an AWS Step Functions application. Configure the function to add a tag to the EC2 instance that produced the login event and mark the instance to be decommissioned. Then create a CloudWatch Events rule to trigger a second AWS Lambda function once a day that will terminate all instances with this tag.
  • B. Create a CloudWatch alarm that will trigger on the login event. Send the notification to an Amazon SNS topic that the operations team is subscribed to, and have them terminate the EC2 instance within 24 hours.
  • C. Create a CloudWatch alarm that will trigger on the login event. Configure the alarm to send to an Amazon SQS queue. Use a group of worker instances to process messages from the queue, which then schedules the Amazon CloudWatch Events rule to trigger.
  • D. Create a CloudWatch Logs subscription in 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 a CloudWatch Events rule to trigger 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
SmileyCloud
Highly Voted 2 years, 5 months ago
Selected Answer: D
A - You can't create a log subscription to AWS Step Function. Only OpenSearch, Kinesis, Kinesis Firehouse and Lambda. B - is a manual process. It needs to be automated. C - Too complex. Architecture doesn't make any sense. D - Correct.
upvoted 5 times
[Removed]
2 years, 4 months ago
Yes D seems to be a more direct approach but it is possible to create a log subscription to an AWS Step Functions application. CloudWatch Logs can be configured to send log data to a Step Functions state machine, which can then be used to process the log data and perform various actions based on the contents of the log data
upvoted 1 times
bgc1
2 years, 2 months ago
also could not find step functions as an option for cw log subscription filter target - https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html
upvoted 1 times
...
bgc1
2 years, 2 months ago
I could not find CW logs in this list - https://docs.aws.amazon.com/step-functions/latest/dg/concepts-invoke-sfn.html
upvoted 1 times
...
...
...
bakamon
Most Recent 1 year, 11 months ago
Selected Answer: D
whenever you have to terminate instances, prefer using tags.. so option D is correct
upvoted 1 times
...
spikeme
2 years ago
Agree D
upvoted 1 times
...
Piccaso
2 years, 3 months ago
Selected Answer: B
B is the most AWS-managed option
upvoted 1 times
...
Bulti
2 years, 4 months ago
D is the correct answer. A is an overkill, B is not automated and C idoesnt make any sense as it does not address how EC2 instances will be terminated.
upvoted 1 times
...
Imstack
2 years, 5 months ago
DDDDDDDDDDDDDDD
upvoted 1 times
...
adozoo
2 years, 5 months ago
Selected Answer: D
Does CloudWatch alarm that will trigger on the login event have such an event?Step function it s use to step like batch exe,just two lambda.no needed
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 ...