- Newest
- Most votes
- Most comments
I understand your concern and have seen this behavior myself too.
What you described in your question is absolutely right, if bucket would exist with that name then with --no-sign-request option, you'll get access denied instead of doesn't exist.
Sometime it takes time to get this cleaned up completely, understand it from eventual consistent way. It'd take maximum of 24 hours, you'd be able to use the same name when creating a new bucket, if by then someone does't create the bucket with same name(less likely if your bucket name was fairly unique).
Please refer S3 Consistency Model for more clarity.
Hope this explanation helps.
Comment here if you have additional question, happy to help.
Abhishek
The bucket namespace is global (not per-account), so if someone else already has a bucket by that name, you won't be able to create/recreate it.
More info since you -1'd my answer and edited your question:
If you've created and destroyed a bucket with a specific name, you won't be able to recreate it immediately, even in the same region or AWS account, because the bucket name remains reserved for some time after deletion. This reservation period is known as the "bucket name retention period", which I'm sure you already know. During this period, the bucket name is not available for reuse to prevent conflicts and issues with data consistency across global S3 space.
AWS does not currently specify the exact duration of the bucket name retention period. It's typically not disclosed, and it definitely can vary depending on AWS's internal processes and system load. AWS Support will in general, recommended to choose a different name for your new bucket if you encounter the "BucketAlreadyExists" error after deleting a bucket with the same name. Eventually, the previous bucket name should become available for reuse, but the exact timeframe is not predictable.
If you have a specific use case or requirement where you need to reuse a bucket name immediately after deletion, you may consider contacting AWS Support for further assistance or to inquire about any potential changes in the bucket name retention policy, but I was unable to find anything that specifically stated a retention policy.
Ref: https://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html#ConsistencyModel
Ref: https://repost.aws/knowledge-center/s3-conflicting-conditional-operation
Correct, it is global, but that doesn't answer my question. If someone else has a bucket by that name, the same aws cli command would return Access Denied or list the contents of the bucket.
Relevant content
- Accepted Answerasked 2 years ago
- asked 8 months ago
- Accepted Answerasked 4 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 10 months ago
Do you have any additional questions, happy to be of help.