question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stack Set fails after accounts became suspended

See original GitHub issue

Describe the bug Stack set operations fails due to terminated / suspended accounts.

To Reproduce Assuming following organization:

Root
- DEV
-- Account 1 (governed with control tower)

Following manifest:

---
region: eu-central-1
version: 2021-03-15

resources:
  - name: rules
    deploy_method: stack_set
    resource_file: templates/rules.template
    deployment_targets:
      organizational_units:
        - DEV
    regions:
      - eu-central-1

Now the account ‘Account 1’ gets terminated, meaning the accounts is removed from control tower (=the corresponding provisioned product get deleted). This action moves the account from the origin OU to the root OU and deletes all control tower specific resources, e.g. AWSControlTowerExection role, so the stack set cannot perform any operation anymore, which lets the stack set fail.

Screenshot 2022-01-05 132856

Expected behavior The stack set detects the control tower termination of the account and removes the corresponding stack instance, like it would be with auto-deployment mode. Alternatively, for terminated accounts the stack instance could be removed with the options “–retain-stack” in case the required roles are not there anymore.

What would be right order to terminate an AWS account in combination with CT customization framework? E.g.

  1. move account to SUSPENDED OU
  2. run CT customizations (so the stack instance get removed)
  3. terminate CT for account
  4. close account

?

Please complete the following i nformation about the solution:

  • Version 2.1.0
  • Region: eu-central-1
  • Was the solution modified from the version published on this repository? NO
  • If the answer to the previous question was yes, are the changes available on GitHub?
  • Have you checked your service quotas for the sevices this solution uses? YES
  • Were there any errors in the CloudWatch Logs? NO

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

1reaction
rmsilva1973commented, Feb 9, 2022

Perhaps feature request #90 might address this issue somewhat

0reactions
hitty5commented, Oct 17, 2022

Since AWS control tower customizations uses AWS stack sets you can try to delete the stack instances of the affected accounts manually.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Delete stack instances from CloudFormation stack sets in ...
When an AWS account is closed or suspended, the CloudFormation StackSets administration role can no longer access the StackSets execution ...
Read more >
Update failed due to suspended accounts in AWS organizations
As a workaround, you could try to set the FailureTolerancePercentage of the Stack Set to 100 so that the stack update continues regardless...
Read more >
Troubleshooting Amazon CloudFormation StackSets
Check the target account numbers that you specified on the Set deployment ... After you have fixed the underlying cause of the stack...
Read more >
CraftCMS admin login page error "Account Suspended"
update users set suspended = 0 where users.email = 'your@email.com'; ... Since your web person is now missing in action, your Craft CMS ......
Read more >
AWS CloudFormation - Retry Stack Operations
During the provisioning process of a stack, it might fail for different reasons like errors in template, typos or invalid values specified for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found