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

A company has an application that runs on a fleet of Amazon EC2 instances. The application requires frequent restarts. The application logs contain error messages when a restart is required. The application logs are published to a log group in Amazon CloudWatch Logs.
An Amazon CloudWatch alarm notifies an application engineer through an Amazon Simple Notification Service (Amazon SNS) topic when the logs contain a large number of restart-related error messages. The application engineer manually restarts the application on the instances after the application engineer receives a notification from the SNS topic.
A DevOps engineer needs to implement a solution to automate the application restart on the instances without restarting the instances.
Which solution will meet these requirements in the MOST operationally efficient manner?

  • A. Configure an AWS Systems Manager Automation runbook that runs a script to restart the application on the instances. Configure the SNS topic to invoke the runbook.
  • B. Create an AWS Lambda function that restarts the application on the instances. Configure the Lambda function as an event destination of the SNS topic.
  • C. Configure an AWS Systems Manager Automation runbook that runs a script to restart the application on the instances. Create an AWS Lambda function to invoke the runbook. Configure the Lambda function as an event destination of the SNS topic.
  • D. Configure an AWS Systems Manager Automation runbook that runs a script to restart the application on the instances. Configure an Amazon EventBridge rule that reacts when the CloudWatch alarm enters ALARM state. Specify the runbook as a target of the rule.
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
daburahjail
Highly Voted 1 year, 9 months ago
Selected Answer: D
It is debatable, as both C and D are correct and simple in their own ways, however, take a look at the number of components in each approach: C: CW -> SNS -> LAMBDA -> SSM (4) D: CW -> EVENTBRIDGE -> SSM (3) There is an extra component (SNS) to maintain on C, also, there is some coding involved on this option, which also needs to be maintained. Even if we already have the SNS created on option C, we still have to go there to remove the notification and configure the lambda invocation. Option D has fewer components, and require less customization.
upvoted 23 times
...
ParagSanyashiv
Highly Voted 2 years, 2 months ago
Selected Answer: C
C makes more sense here
upvoted 10 times
...
jamesf
Most Recent 11 months, 2 weeks ago
Selected Answer: D
D is more simpler solution than C.
upvoted 1 times
...
xdkonorek2
1 year ago
Selected Answer: D
D) B is wrong since it's way easier to use SSM automation runbook to execute logic inside instance using "run command" action within automation runbook than doing this with lambda
upvoted 1 times
...
zijo
1 year, 3 months ago
A is not possible - AWS Systems Manager (SSM) Run Command or Automation runbooks cannot be directly triggered by an Amazon SNS topic. Then C and D are the next best options. C is flexible but D is the most simple solution
upvoted 1 times
...
Diego1414
1 year, 4 months ago
Selected Answer: D
Both C and D are valid answers. However, D is less complicated.
upvoted 3 times
...
jojom19980
1 year, 4 months ago
Selected Answer: D
C is correct , But D is more easy to implement , cost saving, managed services by AWS ^_^
upvoted 2 times
...
thanhnv142
1 year, 5 months ago
B is correct: <implement a solution to automate the application restart on the instances> means we need to automate the restart step. We can use lambda, AWS system manager. <CloudWatch alarm notifies an application engineer through an Amazon Simple Notification Service> means we already have the alarm. We just need to simply trigger the restart process with lambda A, C and D are all too complicated compared to B. They ask for "the MOST operationally efficient manner", not the most complicated one
upvoted 1 times
vn_thanhtung
1 year, 1 month ago
Option B not correct. https://docs.aws.amazon.com/systems-manager/latest/userguide/running-automations-event-bridge.html
upvoted 1 times
...
...
thanhnv142
1 year, 5 months ago
B is correct: <implement a solution to automate the application restart on the instances> means we need to automate the restart step. We can use lambda, AWS system manager. <CloudWatch alarm notifies an application engineer through an Amazon Simple Notification Service> means we already have the alarm. We just need to simply trigger the restart process with lambda A, C and D are all too complicated compared to A. They ask for "the MOST operationally efficient manner", not the most complicated one
upvoted 1 times
...
z_inderjot
1 year, 6 months ago
Selected Answer: D
For me D is the answer , because we use lamba for the custom operations , if we already have SSM automation to perform that same action then why writing our custom logic in lambda ?
upvoted 2 times
...
csG13
1 year, 6 months ago
Selected Answer: D
It’s D. Here is a reference: https://aws.amazon.com/blogs/mt/use-amazon-eventbridge-rules-to-run-aws-systems-manager-automation-in-response-to-cloudwatch-alarms/
upvoted 4 times
...
HugoFM
1 year, 7 months ago
Selected Answer: D
D It's the most simples approach. But C its also a solution, but why build and mantain a lambda?
upvoted 3 times
...
zolthar_z
1 year, 7 months ago
Selected Answer: B
I think is B, you only need to create the lambda and update the SNS to the lambda,
upvoted 2 times
...
nlw
1 year, 8 months ago
Selected Answer: B
B seems like the shortest number of steps given that SNS already exists
upvoted 2 times
...
AWSdeveloper08
1 year, 9 months ago
Selected Answer: D
Ill go with D too, less components, less configurations
upvoted 3 times
...
beanxyz
1 year, 10 months ago
Selected Answer: D
B is wrong because SSM document is used to run on managed instances so definitely more efficient than lambda. C is wrong because although this solution should work, we need to write a lambda script to invoke the runbook, while in D we don't need to do it
upvoted 2 times
...
beanxyz
1 year, 10 months ago
I think both C and D will work, but the question is to chose the most efficient way, so I pickup D.
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 ...