Question 892 of 1,511
CloudFormation Stack Failure Notification with SNS
A company is using AWS CloudFormation to deploy infrastructure. They want to receive notifications when a stack operation fails, including the specific resource that caused the failure. Which approach should they use?
Quick Answer
The correct approach is to configure an SNS topic as a notification option in the CloudFormation stack and subscribe to receive stack events. This works because CloudFormation natively publishes failure notifications to the specified SNS topic, and each event includes the logical resource ID and the status reason for the failure, giving you the exact resource details without needing to poll the API or set up additional monitoring. On the AWS Certified DevOps Engineer Professional DOP-C02 exam, this question tests your understanding of CloudFormation’s built-in notification mechanism versus workarounds like Lambda triggers or custom scripts—a common trap is assuming you need to parse CloudTrail logs or use EventBridge, but SNS is the simplest direct integration. For a quick memory tip, think “Stack fails, SNS mails the details”—the notification option is set at the stack level, not per resource, and it delivers the failing resource’s logical ID and reason in real time.
⚠ Common exam trap
Test-takers frequently confuse CloudWatch metrics or CloudTrail with CloudFormation's native notification capability, assuming that failure events are exposed as metrics or logs rather than through SNS topic subscriptions.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Configure an SNS topic as a notification option in the CloudFormation stack and subscribe to receive stack events.
CloudFormation allows you to specify an SNS topic ARN as a notification option when creating or updating a stack. When a stack operation fails, CloudFormation publishes a notification to that SNS topic, and the notification includes the logical resource ID and the status reason for the failure. This provides real-time, event-driven notifications without requiring polling or additional services.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create a CloudWatch alarm on the 'StackFailure' metric.
Why it's wrong here
CloudFormation does not emit a 'StackFailure' metric.
- ✓
Configure an SNS topic as a notification option in the CloudFormation stack and subscribe to receive stack events.
Why this is correct
CloudFormation can send stack events (including failures) to SNS.
- ✗
Create an AWS Lambda function that polls the CloudFormation DescribeStackEvents API every minute and sends an email on failure.
Why it's wrong here
Polling is inefficient; CloudFormation already supports SNS notifications.
- ✗
Enable AWS CloudTrail to log CloudFormation API calls and configure an SNS notification on the trail.
Why it's wrong here
CloudTrail logs API calls, but not resource-level failure details.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on DOP-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is using AWS CloudFormation to deploy infrastructure. The DevOps team wants to receive notifications when a stack creation fails. Which services can be used together to send an email notification on stack failure? (Choose TWO.)
easy- A.AWS Lambda
- B.Amazon Simple Queue Service (SQS)
- ✓ C.Amazon Simple Notification Service (SNS)
- ✓ D.AWS CloudFormation
- E.Amazon CloudWatch
Why C: Amazon SNS (Option C) is correct because it can send email notifications to subscribers when a CloudFormation stack creation fails. AWS CloudFormation (Option D) is correct because it can directly publish failure events to an SNS topic via the 'NotificationARNs' parameter in stack creation, enabling automated email alerts without additional services.
Variation 2. A company is using AWS CloudFormation to manage infrastructure. The DevOps team wants to receive notifications when CloudFormation stack creation fails. Which AWS service should be used to capture the stack failure event and send a notification?
easy- A.Amazon SQS
- B.Amazon CloudWatch Logs
- C.AWS CloudTrail
- ✓ D.Amazon EventBridge
Why D: Amazon EventBridge can capture CloudFormation stack events (such as CREATE_FAILED) using event rules and route them to targets like Amazon SNS for notifications. Option A is wrong because Amazon SQS is a message queue service and does not directly send notifications; it requires a consumer. Option B is wrong because Amazon CloudWatch Logs stores log data but does not capture CloudFormation events or send notifications. Option C is wrong because AWS CloudTrail records API calls but is not designed for real-time event-driven notifications; it is better suited for auditing.
Last reviewed: Jun 24, 2026
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.