AWS Error Message: A conflicting conditional operation is currently in progress against this resource
I got the same error message, when I did following:
created a bucket - it went by default to US region (used AWSCLI)
realized, the bucket shall go to EU region and deleted it (used AWS console)
(few minutes later) tried to create the bucket, specifying the EU region
At step 3, AWS console has shown me the error message from title of your question.
So I guess, that the bucket in US was deleted, but there are possibly some synchronization processes, which are taking time. And I hope, that waiting few hours I will find the bucket name again available for creation - this time in proper (EU) region.
FIX :- Edit: About an hour later, my attempt to create the bucket (in EU region) succeeded.
For all others who stumble upon this thread from google, as 1st result in search for this error message:
If you deleted bucket, to recreate in new region, do not wait "manually" until this background sync will be complete, instead put a small bash script to run and retry your needed bucket creation every 5 seconds or so.
Example:
#!/bin/bash
RESULT=2
until [ $RESULT -eq 0 ]; do
aws s3 mb s3://your.bucket.name --region us-west-2
RESULT=$?
sleep 5
done
echo "Bucket created!"
it will retry the "create bucket" operation for you, every few seconds (depend on 'sleep' ) and as soon as it's possible - will create it for you, so no one can steal your bucket name by mistake :)
hope it helps :)
The request in your example is to create a bucket. If you are trying to create too many buckets or replace buckets, it is not healthy.
Note that you have a limit of 100 buckets for an account (see here). EDIT: Now this limit is a "soft limit" and you can increase it if needed.
Also note that a creation of a bucket takes time and:
...it is not appropriate to make bucket create or delete calls on the high availability code path of your application...
It is better to create your buckets once and then, you can put as many objects that you like in your existing buckets (or even a single one).
Anyway, when working with a system that is bound to fail any now and then, you should be able to handle errors and slow down your process when receiving such an error. See more details in AWS Docs.