-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
S3 - Allow create_bucket(region=None), instead of throwing IllegalLocationConstraintException #3292
Comments
Hi @changliuit, this mimics the behaviour from AWS itself. |
Hey @bblommers thanks for your reply! Right now the Regards |
Hi @changliuit, I wasn't aware of the region=None behaviour! Will mark it as an enhancement |
thanks @bblommers that'll be great |
The failing test was introduced I believe by a change in behaviour noted in this issue: getmoto/moto#3292. The solution is to set a region in the create_bucket call. Fixes open-telemetry#1088
The failing test was introduced I believe by a change in behaviour noted in this issue: getmoto/moto#3292. The solution is to set a region in the create_bucket call. Fixes #1088
I understand I can work around this by specifying a region, but I choose not to (I have too many |
Hi @changliuit, can you share an example test of the region=none? |
The failing test was introduced I believe by a change in behaviour noted in this issue: getmoto/moto#3292. The solution is to set a region in the create_bucket call. Fixes open-telemetry#1088
Moto 1.3.16 also fails for s3.create_bucket(Bucket=bucket_name). |
The failing test was introduced I believe by a change in behaviour noted in this issue: getmoto/moto#3292. The solution is to set a region in the create_bucket call. Fixes #1088
I got this error with mocking S3, seems to be the trick that the mocked S3 client only accepts region
|
I got this error even with setting to |
+ fixating moto to 1.3.14 getmoto/moto#3292
I was getting the same error, because mock s3 expects default region to be
|
Ended up with os.environ["AWS_DEFAULT_REGION"] = moto.s3.responses.DEFAULT_REGION_NAME = "eu-west-1" |
Closing this, as the original report was not a bug, as far as I'm concerned. |
Works with s3_client.create_bucket(
Bucket="test",
CreateBucketConfiguration={"LocationConstraint": "eu-west-1"}
) |
Is eu-west-1 somehow special here? I'm still getting this error after trying the advice here - with the exception of not being able to set moto.s3.responses.DEFAULT_REGION_NAME because I'm using it through docker. |
Version: moto: 1.3.15; botocore: 1.17.56
python 3.7.4
was working before with moto 1.3.14, but stopped working in 1.3.15
error:
test as below:
The text was updated successfully, but these errors were encountered: