Skip to content

Instantly share code, notes, and snippets.

View scottharris's full-sized avatar

Scott Harris scottharris

View GitHub Profile
@scottharris
scottharris / README.md
Created December 12, 2024 00:26 — forked from magnetikonline/README.md
Remove existing AWS CloudFormation stack, but retain all managed resources.

Delete CloudFormation stack - retaining resources

A guide for removing an existing CloudFormation stack - but retaining all managed resources.

First step - we need to get the CloudFormation stack into a state of DELETE_FAILED. This can be achieve by attempting stack delete with an IAM role that only has IAM action rights to cloudformation:DeleteStack and cloudformation:DescribeStackResources.

Create a new temporary IAM role with only the following allowed policy actions:

{