Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Bug: Use existing S3 bucket if stack is redeployed in prod #2363

Open
Jimlinz opened this issue Nov 25, 2022 · 2 comments
Open

Bug: Use existing S3 bucket if stack is redeployed in prod #2363

Jimlinz opened this issue Nov 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Jimlinz
Copy link
Contributor

Jimlinz commented Nov 25, 2022

Geostore provisions several s3 buckets (prod and staging) within its stack. These buckets are town down in non-prod environments when the cdk destroy command is issued, but they are set to retain in production. This is by design and also an expected behaviour.

However, should we need to destroy the stack in production one day and redeploy it, we would run into problems during (re)deployment since the bucket is already in place. We would likely get a resource already exist error when we try to (re)deploy the stack in production.

We should investigate the canonical way of dealing with such situation and update our stack accordingly.

Things to keep in mind:

  • Bucket permission (i.e. how it could be made available to the new stack)
@Jimlinz Jimlinz added the bug Something isn't working label Nov 25, 2022
@Jimlinz
Copy link
Contributor Author

Jimlinz commented Nov 25, 2022

Would this also apply to resources like dynamodb?

@Jimlinz
Copy link
Contributor Author

Jimlinz commented Nov 25, 2022

Is it a good idea to do a periodic tear down the production stack and redeploy (perhaps in a different aws account) to capture potential problems?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant