Determine the cause of a stack failure - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Determine the cause of a stack failure

If your stack creation fails, CloudFormation can help you to determine the event that is likely the root cause for the stack failure. Depending on the scenario and your permissions, Amazon CloudTrail events may be able to provide further details about the root cause in case the provided Status reason in Events is not clear.

To determine the root cause of a stack failure
  1. Open the Amazon CloudFormation console at https://console.amazonaws.cn/cloudformation.

  2. On the Stacks page, choose the failed stack.

  3. Choose the Events tab.

  4. Choose Detect root cause. CloudFormation will analyze the failure and indicate the event that is the likely the cause for the failure by adding a Likely root cause label to the specific event Status. See Status reason for further explanation of the status in the CloudFormation console.

  5. Choose the failed Status with the Likely root cause label to learn more about the cause of the failure. Depending on the scenario and your permissions, you may be able to review a detailed CloudTrail event. These are the following potential outcomes of choosing the Status

    • CloudTrail events related to this issue are available and may help with resolution. View CloudTrail events.

    • We couldn't find any CloudTrail events related to this issue that could help with resolution.

    • Your current permissions do not allow access to view CloudTrail events. Learn more.

    • In the process of checking for available CloudTrail events, check back in a few minutes.

    • An error occurred while fetching the CloudTrail events. For manual inspection, visit the CloudTrail console.

  6. If the provided reason in Status reason isn't clear, and the root cause displays a link to the CloudTrail console, open the link to view the event to find a detailed root cause.

For more information on CloudTrail events, see Understanding CloudTrail events and CloudTrail record contents.

For more information on CloudTrail event history, see Working with CloudTrail Event history.

Note

Nested stacks don't support Detect root cause.