Why is my stack instance in the stack set stuck in pending status?

2 minute read
0

I want to resolve the problem of stack instances from AWS CloudFormation stack sets that remain in a pending status during an update.

Resolution

When you update a stack set, you might notice that most of the instances are updated and show a CURRENT status. However, some of the remaining instances in the update might show a PENDING status.

This behavior occurs because of the stack set failure handling feature in AWS CloudFormation. The feature modifies the ListStackInstances API to show DETAILED STATUS instead of the STATUS of the stack instances.
Note: Stack set operations include, but are not limited to, updating the stack set and deleting stack instances within a stack set.

The status code PENDING means that the operation in the specified account and Region has yet to start. The Pending state (Status: OUTDATED or DetailedStatus: PENDING) appears when you update a stack set without specifying deployment targets for its stack set instances. When the deployment targets are absent, the instances with the PENDING status wait to be updated with the latest stack set template.

To resolve this issue:

  1. Log in to the AWS CloudFormation console.
  2. Perform a stack set update.
    Note: For Choose a template, keep the current stack template.
  3. For Deployment targets, enter the accounts that are in a PENDING status. Specify the account ID, select the Region of these stack instances, and then submit. This configuration changes the stack instance status from OUTDATED to CURRENT.
AWS OFFICIAL
AWS OFFICIALUpdated 2 months ago