Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating buckets s3 mb s3://$BUCKET_NAME #6113

Closed
damianarata opened this issue Apr 22, 2021 · 3 comments
Closed

Error creating buckets s3 mb s3://$BUCKET_NAME #6113

damianarata opened this issue Apr 22, 2021 · 3 comments
Labels
closed-for-staleness guidance Question that needs advice or information. s3

Comments

@damianarata
Copy link

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
I've tried to create a bucket by CLI and Console. I have the same error: make_bucket failed: s3://mybucketname An error occurred (OperationAborted) when calling the CreateBucket operation: A conflicting conditional operation is currently in progress against this resource. Please try again.

SDK version number
aws-cli/2.1.1 Python/3.7.3 Linux/5.4.0-70-generic exe/x86_64.ubuntu.18

Platform/OS/Hardware/Device
I'm running on CLI and WebConsole.

To Reproduce (observed behavior)
s3 mb s3://$BUCKET_NAME

Expected behavior
This should create a bucket.

Logs/output

2021-04-22 11:04:01,649 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.1.1 Python/3.7.3 Linux/5.4.0-70-generic exe/x86_64.ubuntu.18
2021-04-22 11:04:01,649 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['s3', 'mb', 's3://lambda-artifacts-822af47bbc7515ff', '--region', 'us-east-1', '--debug']
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x7fa040d85d90>
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x7fa040f09ae8>
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>>
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7fa040fb46a8>
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7fa040fbd6a8>
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function alias_opsworks_cm at 0x7fa040d9c510>
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_history_commands at 0x7fa040ed61e0>
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.devcommands.CLIDevCommand'>>
2021-04-22 11:04:01,657 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_waiters at 0x7fa040d8e7b8>
2021-04-22 11:04:01,657 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.1.1/dist/awscli/data/cli.json
2021-04-22 11:04:01,661 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_types at 0x7fa040e7b048>
2021-04-22 11:04:01,661 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function no_sign_request at 0x7fa040e7b2f0>
2021-04-22 11:04:01,661 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_verify_ssl at 0x7fa040e7b268>
2021-04-22 11:04:01,661 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_read_timeout at 0x7fa040e7b400>
2021-04-22 11:04:01,661 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_connect_timeout at 0x7fa040e7b378>
2021-04-22 11:04:01,661 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <built-in method update of dict object at 0x7fa040d123a8>
2021-04-22 11:04:01,661 - MainThread - botocore.session - DEBUG - Setting config variable for region to 'us-east-1'
2021-04-22 11:04:01,662 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.1.1 Python/3.7.3 Linux/5.4.0-70-generic exe/x86_64.ubuntu.18
2021-04-22 11:04:01,662 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['s3', 'mb', 's3://lambda-artifacts-822af47bbc7515ff', '--region', 'us-east-1', '--debug']
2021-04-22 11:04:01,662 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_timestamp_parser at 0x7fa040d89378>
2021-04-22 11:04:01,662 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7fa04130ff28>
2021-04-22 11:04:01,662 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_binary_formatter at 0x7fa040d4e0d0>
2021-04-22 11:04:01,662 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function no_pager_handler at 0x7fa041404bf8>
2021-04-22 11:04:01,662 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7fa0412d1510>
2021-04-22 11:04:01,663 - MainThread - botocore.utils - DEBUG - IMDS ENDPOINT: http://169.254.169.254/
2021-04-22 11:04:01,665 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7fa040ed60d0>
2021-04-22 11:04:01,665 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_json_file_cache at 0x7fa040f06a60>
2021-04-22 11:04:01,665 - MainThread - botocore.hooks - DEBUG - Event building-command-table.s3: calling handler <function add_waiters at 0x7fa040d8e7b8>
2021-04-22 11:04:01,665 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.s3.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7fa040cd5b38>
2021-04-22 11:04:01,665 - MainThread - botocore.hooks - DEBUG - Event building-command-table.s3_mb: calling handler <function add_waiters at 0x7fa040d8e7b8>
2021-04-22 11:04:01,666 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.mb.path: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7fa040cd5b38>
2021-04-22 11:04:01,666 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.mb: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7fa04134d550>
2021-04-22 11:04:01,666 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2021-04-22 11:04:01,666 - MainThread - botocore.credentials - INFO - Found credentials in environment variables.
2021-04-22 11:04:01,667 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.1.1/dist/botocore/data/endpoints.json
2021-04-22 11:04:01,671 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x7fa04279c598>
2021-04-22 11:04:01,681 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.1.1/dist/botocore/data/s3/2006-03-01/service-2.json
2021-04-22 11:04:01,688 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.1.1/dist/botocore/data/s3/2006-03-01/service-2.sdk-extras.json
2021-04-22 11:04:01,691 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_post at 0x7fa0427d2bf8>
2021-04-22 11:04:01,691 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_url at 0x7fa0427d29d8>
2021-04-22 11:04:01,694 - MainThread - botocore.endpoint - DEBUG - Setting s3 timeout as (60, 60)
2021-04-22 11:04:01,695 - MainThread - botocore.hooks - DEBUG - Event provide-client-params.s3.CreateBucket: calling handler <function base64_decode_input_blobs at 0x7fa040d4e7b8>
2021-04-22 11:04:01,695 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.CreateBucket: calling handler <function validate_bucket_name at 0x7fa04273f598>
2021-04-22 11:04:01,695 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.CreateBucket: calling handler <bound method S3RegionRedirector.redirect_from_cache of <botocore.utils.S3RegionRedirector object at 0x7fa040916588>>
2021-04-22 11:04:01,695 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.CreateBucket: calling handler <bound method S3ArnParamHandler.handle_arn of <botocore.utils.S3ArnParamHandler object at 0x7fa040916898>>
2021-04-22 11:04:01,695 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.CreateBucket: calling handler <function generate_idempotent_uuid at 0x7fa04273f400>
2021-04-22 11:04:01,695 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.CreateBucket: calling handler <function add_expect_header at 0x7fa04273f8c8>
2021-04-22 11:04:01,695 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.CreateBucket: calling handler <bound method S3RegionRedirector.set_request_url of <botocore.utils.S3RegionRedirector object at 0x7fa040916588>>
2021-04-22 11:04:01,695 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.CreateBucket: calling handler <function inject_api_version_header_if_needed at 0x7fa042742b70>
2021-04-22 11:04:01,695 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=CreateBucket) with params: {'url_path': '/lambda-artifacts-822af47bbc7515ff', 'query_string': {}, 'method': 'PUT', 'headers': {'User-Agent': 'aws-cli/2.1.1 Python/3.7.3 Linux/5.4.0-70-generic exe/x86_64.ubuntu.18 command/s3.mb'}, 'body': b'', 'url': 'https://s3.us-east-1.amazonaws.com/lambda-artifacts-822af47bbc7515ff', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x7fa040916160>, 'has_streaming_input': False, 'auth_type': None, 'signing': {'bucket': 'lambda-artifacts-822af47bbc7515ff'}}}
2021-04-22 11:04:01,696 - MainThread - botocore.hooks - DEBUG - Event request-created.s3.CreateBucket: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7fa0409160f0>>
2021-04-22 11:04:01,696 - MainThread - botocore.hooks - DEBUG - Event choose-signer.s3.CreateBucket: calling handler <function set_operation_specific_signer at 0x7fa04273f2f0>
2021-04-22 11:04:01,696 - MainThread - botocore.hooks - DEBUG - Event before-sign.s3.CreateBucket: calling handler <bound method S3EndpointSetter.set_endpoint of <botocore.utils.S3EndpointSetter object at 0x7fa040916908>>
2021-04-22 11:04:01,696 - MainThread - botocore.utils - DEBUG - Defaulting to S3 virtual host style addressing with path style addressing fallback.
2021-04-22 11:04:01,696 - MainThread - botocore.utils - DEBUG - Checking for DNS compatible bucket for: https://s3.us-east-1.amazonaws.com/lambda-artifacts-822af47bbc7515ff
2021-04-22 11:04:01,696 - MainThread - botocore.utils - DEBUG - URI updated to: https://lambda-artifacts-822af47bbc7515ff.s3.us-east-1.amazonaws.com/
2021-04-22 11:04:01,696 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-04-22 11:04:01,696 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
PUT
/

host:lambda-artifacts-822af47bbc7515ff.s3.us-east-1.amazonaws.com
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20210422T140401Z
x-amz-security-token:

host;x-amz-content-sha256;x-amz-date;x-amz-security-token

2021-04-22 11:04:01,696 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210422T140401Z
20210422/us-east-1/s3/aws4_request

2021-04-22 11:04:01,696 - MainThread - botocore.auth - DEBUG - Signature:

2021-04-22 11:04:01,697 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=PUT, url=https://lambda-artifacts-822af47bbc7515ff.s3.us-east-1.amazonaws.com/, headers={'User-Agent': b'aws-cli/2.1.1 Python/3.7.3 Linux/5.4.0-70-generic exe/x86_64.ubuntu.18 command/s3.mb', 'X-Amz-Date': b'20210422T140401Z', 'Content-Length': '0'}>
2021-04-22 11:04:01,697 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): lambda-artifacts-822af47bbc7515ff.s3.us-east-1.amazonaws.com:443
2021-04-22 11:04:02,934 - MainThread - urllib3.connectionpool - DEBUG - https://lambda-artifacts-822af47bbc7515ff.s3.us-east-1.amazonaws.com:443 "PUT / HTTP/1.1" 409 None
2021-04-22 11:04:02,935 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amz-request-id': '', 'x-amz-id-2': '', 'Content-Type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Date': 'Thu, 22 Apr 2021 14:04:02 GMT', 'Server': 'AmazonS3'}
2021-04-22 11:04:02,936 - MainThread - botocore.parsers - DEBUG - Response body:
b'<?xml version="1.0" encoding="UTF-8"?>\n<Error><Code>OperationAborted</Code><Message>A conflicting conditional operation is currently in progress against this resource. Please try again.</Message><RequestId>VSM8TKBTP6K7N76K</RequestId><HostId>AYRrJpcga+LDvfMXk9aOvUX2lFKbDQ/6LiCPL5bfYIpYkfgrnBAC8hraSq292yT1UeEnxfC9DNc=</HostId></Error>'
2021-04-22 11:04:02,940 - MainThread - botocore.hooks - DEBUG - Event needs-retry.s3.CreateBucket: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7fa040916860>>
2021-04-22 11:04:02,940 - MainThread - botocore.retries.standard - DEBUG - Not retrying request.
2021-04-22 11:04:02,940 - MainThread - botocore.hooks - DEBUG - Event needs-retry.s3.CreateBucket: calling handler <bound method S3RegionRedirector.redirect_from_error of <botocore.utils.S3RegionRedirector object at 0x7fa040916588>>
2021-04-22 11:04:02,940 - MainThread - botocore.hooks - DEBUG - Event after-call.s3.CreateBucket: calling handler <function enhance_error_msg at 0x7fa040d85f28>
2021-04-22 11:04:02,941 - MainThread - botocore.hooks - DEBUG - Event after-call.s3.CreateBucket: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x7fa040916518>>
make_bucket failed: s3://lambda-artifacts-822af47bbc7515ff An error occurred (OperationAborted) when calling the CreateBucket operation: A conflicting conditional operation is currently in progress against this resource. Please try again.

Additional context
I added more strings to the name and works fine. I'm starting to think it could be the name is not available and the message error is wrong. Also, I tried to create the same bucket in us-west-2, and works fine.

@kdaily
Copy link
Member

kdaily commented Apr 22, 2021

Hi @rodriguezarata,

This is likely the cause:

https://aws.amazon.com/premiumsupport/knowledge-center/s3-conflicting-conditional-operation/

@kdaily kdaily added guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. s3 and removed needs-triage This issue or PR still needs to be triaged. labels Apr 22, 2021
@damianarata
Copy link
Author

Hi @kdaily, I was using this script to build the name. I tried many times (it'd be generating new names)
I got the error the first time I've tried to create it It's not the cause of conflict for this case, I didn't try deleting it. I used the same name in another region and it worked.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Apr 23, 2021
@kdaily
Copy link
Member

kdaily commented May 3, 2021

Hi @damianarata,

I'm sorry to say that I don't think I can do anything in this case. Since you get the same error with the console and the CLI, there isn't a specific issue with the AWS CLI. Also, the error is coming from the S3 service, not just the CLI.

There have been similar previous reports here that waiting before creating after deleting would do it, even though as you noted you didn't delete the bucket and recreate it. However because of S3's eventual consistency, other operations can result in this error as well.

To get help from S3 engineers, you can ask a question in the AWS Developer Forum for S3:

https://forums.aws.amazon.com/forum.jspa?forumID=24

If you have any other suspicion that this is something with the AWS CLI, let me know, but for S3-related questions the developer forum is the best resource.

@kdaily kdaily added the closing-soon This issue will automatically close in 4 days unless further comments are made. label May 3, 2021
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels May 7, 2021
@github-actions github-actions bot closed this as completed May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information. s3
Projects
None yet
Development

No branches or pull requests

2 participants