Aws-cli: AWS CLI: Create Bucket - A conflicting conditional operation is currently in progress against this resource

Created on 29 Jan 2017  路  7Comments  路  Source: aws/aws-cli

I tried to create bucket using aws-cli, it got created. Then I realized I need to add bucket configuration location constraint for other region. But when I tried to recreate the bucket, it raised an error stating OperationAborted

Commands:

aws s3api create-bucket --bucket "sunil-gulabani-1" --create-bucket-configuration LocationConstraint=us-west-1
{
"Location": "http://sunil-gulabani-1.s3.amazonaws.com/"
}

aws s3api delete-bucket --bucket "sunil-gulabani-1"

aws s3api create-bucket --bucket "sunil-gulabani-1" --create-bucket-configuration LocationConstraint=us-west-2

An error occurred (OperationAborted) when calling the CreateBucket operation: A conflicting conditional operation is currently in progress against this resource. Please try again.
guidance s3api service-api

Most helpful comment

Creating and deleting buckets isn't instantaneous, you need to wait for the bucket to be fully deleted before you re-create it. For example:

aws s3api wait bucket-not-exists --bucket <bucket-name>

All 7 comments

Creating and deleting buckets isn't instantaneous, you need to wait for the bucket to be fully deleted before you re-create it. For example:

aws s3api wait bucket-not-exists --bucket <bucket-name>

You can verify it by running " aws s3api list-buckets". It should give you answer right away.

Closing issue due to inactivity

I'm in a similar spot, but need to change the account the bucket belongs to. I get the same error, though I can recreate the bucket in the (wrong) original account. How long do I need to wait?

Hours, it turns out.

There is no specific time defined in AWS documentation.

It took under an hour for me to be able to recreate deleted buckets in a different AWS account. Both accounts were in the same us-west-2 region, though. Not sure if it speeds things up.

Was this page helpful?
0 / 5 - 0 ratings