AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 360
A DevOps engineer updates an AWS CloudFormation stack to add a nested stack that includes several Amazon EC2 instances. When the DevOps engineer attempts to deploy the updated stack, the nested stack fails to deploy.
What should the DevOps engineer do to determine the cause of the failure?
Answer options
- A. Use the CloudFormation detect root cause capability for the failed stack to analyze the failure and return the event that is the most likely cause for the failure.
- B. Query failed stacks by specifying the root stack as the ParentId property. Examine the StackStatusReason property for all returned stacks to determine the reason the nested stack failed to deploy.
- C. Activate AWS Systems Manager for the AWS account where the application runs. Use the AWS Systems Manager Automation AWS-SupportTroubleshootCFNCustomResource runbook to determine the reason the nested stack failed to deploy.
- D. Configure the CloudFormation template to publish logs to Amazon CloudWatch. View the CloudFormation logs for the failed stack in the CloudWatch console to determine the reason the nested stack failed to deploy.
Correct answer: B
Explanation
To troubleshoot a nested stack failure, you can identify the nested stack by querying with the ParentId property set to the root stack's ID. Checking the StackStatusReason property of the returned nested stack will provide the specific error message explaining why the deployment failed. Other methods, such as using custom resource troubleshooting runbooks or configuring template logging to CloudWatch, are not standard or necessary procedures for resolving nested stack deployment failures.