DOP-C02 practice question 8 of 35
A company has an AWS Cloud Format ion slack that is deployed in a single AWS account. The company has configured the stack to send event…
Full set: 449 questionsA company has an AWS Cloud Format ion slack that is deployed in a single AWS account. The
company has configured the stack to send event notifications to an Amazon Simple Notification
Service (Amazon SNS) topic.
A DevOps engineer must implement an automated solution that applies a tag to the specific Cloud
Formation stack instance only after a successful stack update occurs. The DevOps engineer has
created an AWS Lambda function that applies and updates this tag (or the specific slack instance.
Which solution will meet these requirements?
Correct Answer:
C
Step 1: Reacting to CloudFormation Stack Events with EventBridge
AWS CloudFormation emits events during the lifecycle of a stack, including the UPDATE_COMPLETE
event after a successful stack update. You can use Amazon EventBridge to detect this event and
trigger a specific action (such as invoking a Lambda function).
Action: Create an EventBridge rule that listens for the UPDATE_COMPLETE event for the
CloudFormation stack.
Why: EventBridge allows you to automatically detect CloudFormation stack lifecycle events and take
action based on them.
Step 2: Invoking the Lambda Function
After the EventBridge rule detects the UPDATE_COMPLETE event, it can invoke the pre-configured
Lambda function to apply or update the tag on the specific CloudFormation stack instance.
Action: Configure the EventBridge rule to invoke the Lambda function when the UPDATE_COMPLETE
event occurs.
Why: This automation ensures that the tag is applied immediately after a successful stack update
without any manual intervention.
Reference: AWS documentation on EventBridge Rules.
This corresponds to Option C: Create an Amazon EventBridge rule that matches the
UPDATE_COMPLETE event pattern for the instance status of the CloudFormation stack. Configure the
rule to invoke the Lambda function.
Keep practicing
Take the free DOP-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DOP-C02 practice questions
- Question 1A company has enabled all features for its organization in AWS Organizations. The organiz…
- Question 2A company is developing a web application's infrastructure using AWS CloudFormation The d…
- Question 3A company uses Amazon Redshift as its data warehouse solution. The company wants to creat…
- Question 4A company recently deployed its web application on AWS. The company is preparing for a la…
- Question 5A company is migrating from its on-premises data center to AWS. The company currently use…
- Question 6A security team is concerned that a developer can unintentionally attach an Elastic IP ad…
