acidjazz/aeonian

Issue with S3 bucket recreation on redeploy

zivagolee opened this issue · 0 comments

After recreating the s3 bucket a few times with the same name, seems like something on AWS doesn't like that and I am not able to create the bucket with the same name again.

Log message when issue starts:

  nuxt:generate Generate done +1ms
✔ Loading æonian
✔ Parsing configuration
ℹ Bucket currently exists, removing first
✔ Emptying bucket: xx-xxxxxxx-production
✔ Deleting bucket: xx-xxxxxxx-production
✔ Creating bucket: xx-xxxxxxx-production
✖ unable to sync:
Done in 50.76s.

Log message the next time it is run:

nuxt:generate Generate done +0ms
✔ Loading æonian
✔ Parsing configuration
✖ s3.createbucket() Error:BucketAlreadyExists: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
Done in 40.14s.

Due to this, I think we shouldn't delete the bucket unless the bucket name has changed and we should only empty the bucket.