QuestionQ20

VerifiedIncident and Event Response

A DevOps engineer has created an AWS Lambda function. The Lambda function initiates an AWS CloudFormation drift-detection operation on all supported resources for a particular CloudFormation stack, and then exits the invocation.

The DevOps engineer has set up 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, and the DevOps engineer has subscribed to that SNS topic to receive notifications.

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

Which solution meets these requirements?

Explanation

The AWS Config managed rule CLOUDFORMATION_STACK_DRIFT_DETECTION_CHECK checks whether a CloudFormation stack has drifted and reports the stack as NON_COMPLIANT when its drift status is DRIFTED. An EventBridge rule that matches the resulting compliance-change event for the specified stack can send an SNS notification. This avoids querying an asynchronous CloudFormation drift-detection operation before its results are available.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!