Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when terminating a stack #40

Open
vkurup opened this issue Feb 7, 2018 · 1 comment
Open

Issues when terminating a stack #40

vkurup opened this issue Feb 7, 2018 · 1 comment

Comments

@vkurup
Copy link
Contributor

vkurup commented Feb 7, 2018

I noticed the following issues when terminating an EB stack.

  • 3 resources are not deleted and the event logs say that deletion was skipped: ContainerLogs (CloudWatch), PrivateAssetsBucket (S3), AssetsBucket (S3). The ContainerLogs have an expiration of 365 days, so they will eventually get deleted, and maybe it's a useful thing to have logs around for a while after termination. But the S3 buckets seem like they would just linger forever causing unneeded charges.
  • 1 resource deletion fails, which causes the stack's status to be 'DELETE_FAILED'. This is the ECR which fails with this messsage: "The repository with name 'disco-fred' in registry with id '112250541543' cannot be deleted because it still contains images"
@vkurup
Copy link
Contributor Author

vkurup commented Feb 8, 2018

Looks like the S3 buckets and Logs are intentionally NOT deleted.

Some background: https://aws.amazon.com/blogs/devops/delete-your-stacks-but-keep-your-data/

This also led me to identify that the default policy for RDS is to save a snapshot before deletion. (Unfortunately these snapshots don't get tagged with our custom tags, so I didn't see them until reading about the DeletionPolicy docs)

So my suggestions:

  1. Add docs about what resources are expected to remain after stack termination, and how to find them.
  2. (Maybe) Add a user parameter that allows you to specify that everything should be deleted on termination.
  3. Break out the ECR deletion fail as a separate bug (which I haven't been able to diagnose yet)

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant