- Install aws-nuke to reference this releases page
- Copy
config.yml
file into the project directory - Change
<Account ID>
to your account id inconfig.yml
- Config credentials profile with IAM User who got admin permission
$ aws configure
AWS Access Key ID [****************ABCD]: Access Key
AWS Secret Access Key [****************ABCD]: Secret Access Key
- Create iam account alias, If not created
$ aws iam create-account-alias --account-alias <example>
run aws-nuke using this command
$ aws-nuke -c config.yml
but aws-nuke only lists all found resources and exits.
This is because --no-dry-run
flag is missing.
So if you delete resources actually, add --no-dry-run
.
$ aws-nuke -c config.yml --no-dry-run