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

A DevOps engineer has developed an AWS Lambda function. The Lambda function starts an AWS CloudFormation drift detection operation on all supported resources for a specific CloudFormation stack. The Lambda function then exits its invocation.

The DevOps engineer has created an Amazon EventBridge scheduled rule that invokes the Lambda function every hour. An Amazon Simple Notification Service (Amazon SNS) topic already exists in the AWS account. The DevOps engineer has subscribed to the SNS topic to receive notifications.

The DevOps engineer needs to receive a notification as soon as possible when drift is detected in this specific stack configuration.

Which solution will meet these requirements?

  • A. Configure the existing EventBridge rule to also target the SNS topic. Configure an SNS subscription filter policy to match the CloudFormation stack. Attach the subscription filter policy to the SNS topic.
  • B. Create a second Lambda function to query the CloudFormation API for the drift detection results for the stack. Configure the second Lambda function to publish a message to the SNS topic if drift is detected. Adjust the existing EventBridge rule to also target the second Lambda function.
  • C. Configure Amazon GuardDuty in the account with drift detection for all CloudFormation stacks. Create a second EventBridge rule that reacts to the GuardDuty drift detection event finding for the specific CloudFormation stack. Configure the SNS topic as a target of the second EventBridge rule.
  • D. Configure AWS Config in the account. Use the cloudformation-stack-drift-detection-check managed rule. Create a second EventBridge rule that reacts to a compliance change event for the CloudFormation stack. Configure the SNS topic as a target of the second EventBridge 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
Nano803
Highly Voted 1 year, 2 months ago
Selected Answer: D
I recommend checking out this blog which utilizes AWS Config and discusses Edenbridge. Here is the link: https://aws.amazon.com/blogs/mt/implementing-an-alarm-to-automatically-detect-drift-in-aws-cloudformation-stacks/"
upvoted 7 times
Gomer
10 months, 1 week ago
Info gleaned from following the link(++): cloudformation-stack-drift-detection-check AWS Config rule that checks if the actual configuration of a AWS CloudFormation (AWS CloudFormation) stack differs, or has drifted, from the expected configuration. MaximumExecutionFrequency The maximum frequency with which AWS Config runs evaluations for a rule. Example stack to detect and notify on drift: [...] MaximumExecutionFrequency: Description: "The maximum frequency with which drift in CloudFormation stacks need to be evaluated (default - One_Hour)" Type: "String" Default: "One_Hour" AllowedValues: ["One_Hour","Three_Hours","Six_Hours","Twelve_Hours","TwentyFour_Hours"] [...]
upvoted 1 times
...
...
kyuhuck
Highly Voted 1 year, 2 months ago
Selected Answer: D
Given the options and the requirement for immediate notification upon drift detection, Option D is the most appropriate solution. It leverages AWS Config to continuously monitor and evaluate the configurations of AWS resources, including CloudFormation stacks. When AWS Config detects a drift from the desired configuration, it can trigger an EventBridge rule, which in turn can notify the interested parties via the SNS topic. This approach does not require additional custom logic to check for drift results, as AWS Config handles the evaluation and notification process based on configuration changes.
upvoted 5 times
...
iulian0585
Most Recent 9 months, 1 week ago
Selected Answer: B
The solution that will meet the requirements of receiving a notification as soon as possible when drift is detected in the specific CloudFormation stack configuration is: B. Create a second Lambda function to query the CloudFormation API for the drift detection results for the stack. Configure the second Lambda function to publish a message to the SNS topic if drift is detected. Adjust the existing EventBridge rule to also target the second Lambda function. Option D (Using AWS Config) would introduce additional complexity and potential delays, as AWS Config periodically evaluates resource configurations and may not provide immediate notifications upon drift detection. By creating a separate Lambda function dedicated to monitoring drift detection results and publishing notifications to the existing SNS topic, you can ensure timely and reliable notifications while maintaining a modular and scalable architecture.
upvoted 3 times
chinchin97
8 months, 2 weeks ago
This approach introduces additional complexity by adding another Lambda function to query and check for drift manually. Who is going to trigger this Lambda function? Even if you do it on a interval, it defeats the purpose of getting notified immediately. AWS Config provides a more straightforward and managed way to detect and notify on drift with a managed rule, cloudformation-stack-drift-detection-check. https://docs.aws.amazon.com/config/latest/developerguide/cloudformation-stack-drift-detection-check.html
upvoted 1 times
...
...
dkp
1 year, 1 month ago
Selected Answer: D
answer D AWS Config Integration: AWS Config is specifically designed to monitor and detect configuration changes and drifts in AWS resources, including CloudFormation stacks. Using AWS Config's built-in cloudformation-stack-drift-detection-check managed rule ensures comprehensive and reliable drift detection for CloudFormation stacks. Event-Driven Architecture: Creating an EventBridge rule that reacts to a compliance change event for the CloudFormation stack allows you to trigger an alert as soon as drift is detected. This event-driven approach ensures timely detection and alerting for CloudFormation stack drift. SNS Notification: By configuring the SNS topic as a target of the EventBridge rule, you can easily send notifications/alerts to various endpoints, including email, SMS, or other AWS services, ensuring immediate alerting when drift is detected.
upvoted 4 times
...
WhyIronMan
1 year, 1 month ago
Selected Answer: D
D, Use the cloudformation-stack-drift-detection-check managed rule B uses scheduled rule will not notify as soon as possible as it runs hourly
upvoted 4 times
...
DanShone
1 year, 1 month ago
Selected Answer: D
D woudl be suitable - https://docs.aws.amazon.com/config/latest/developerguide/cloudformation-stack-drift-detection-check.html B would not work as it would still only be triggered once per hour as is using the same event bridge rule
upvoted 5 times
...
Shasha1
1 year, 2 months ago
D refer this: https://docs.aws.amazon.com/config/latest/developerguide/cloudformation-stack-drift-detection-check.html
upvoted 2 times
...
dzn
1 year, 2 months ago
Selected Answer: B
The minimum interval for the `cloudformation-stack-drift-detection-check` managed rule in AWS config is 1 hour and does not meet the following requirements. `as soon as possible when drift is detected`
upvoted 1 times
sejar
1 year, 2 months ago
Any reference to 1 hour limit, ?
upvoted 1 times
...
...
fdoxxx
1 year, 2 months ago
Selected Answer: B
B is a suitable solution for meeting the requirements: This solution provides a more direct and responsive approach. The other options involve additional services like GuardDuty (Option C), which is not designed for CloudFormation drift detection, or AWS Config with managed rules (Option D), which may introduce unnecessary complexity for this specific scenario. Option A doesn't provide a straightforward way to react to drift detection events.
upvoted 2 times
...
Ramdi1
1 year, 3 months ago
Selected Answer: A
Leverages existing infrastructure: This approach utilizes the existing EventBridge rule and SNS topic, avoiding the need for additional resources or complex configurations. Immediate notification: Since the EventBridge rule already triggers the Lambda function every hour, adding the SNS topic as a target ensures drift detection results are published directly to the topic for immediate notification. Filtering for specific stack: Implementing an SNS subscription filter policy ensures you only receive notifications for the specific CloudFormation stack you're interested in, avoiding irrelevant noise.
upvoted 1 times
Ramdi1
1 year, 3 months ago
B: Introduces an additional Lambda function and complexity, and requires polling for drift status, possibly delaying notification compared to real-time detection. C: While GuardDuty offers centralized drift detection, setting up a separate EventBridge rule and relying on event findings adds extra steps and might not be as timely as direct notification from the Lambda function. D: Although Config's cloudformation-stack-drift-detection-check rule identifies drift, triggering an EventBridge rule on compliance changes adds another layer of complexity and might not offer real-time notification like option A.
upvoted 1 times
...
...
thanhnv142
1 year, 3 months ago
Selected Answer: B
B: is correct A: SNS topic would be trigger consistenly by the existing evenbridge, so this is incorrect C: Guarduty is for threat detection, not this D: irrelevant, the question requires using ACF drif detection, not AWS config for drift detection
upvoted 1 times
...
Chelseajcole
1 year, 3 months ago
D. AWS Config
upvoted 2 times
...
Arnaud92
1 year, 3 months ago
Selected Answer: B
B is the most appropriate solution for this scenario. A is incorrect because although it involves configuring the existing EventBridge rule to target the SNS topic and using an SNS subscription filter policy, it does not involve querying the CloudFormation API for drift detection results. C is incorrect because it involves using Amazon GuardDuty, which is not specifically designed for CloudFormation drift detection. D is incorrect because although it involves using AWS Config and EventBridge to react to compliance change events, it does not directly address CloudFormation drift detection. With CloudWatch Events (now a part of EventBridge) https://aws.amazon.com/fr/blogs/mt/implement-automatic-drift-remediation-for-aws-cloudformation-using-amazon-cloudwatch-and-aws-lambda/
upvoted 2 times
...
Spavanko
1 year, 3 months ago
Selected Answer: D
B is wrong, you can not query the CloudFormation API
upvoted 4 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