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

fix(IllegalLocationConstraintException): Recover bucket policy using the right region endpoint #1155

Merged
merged 1 commit into from
May 23, 2022

Conversation

jfagoagas
Copy link
Member

@jfagoagas jfagoagas commented May 23, 2022

Context

extra771 was failing due to the following error:

An error occurred (IllegalLocationConstraintException) when calling the GetBucketPolicy operation: The af-south-1 location constraint is incompatible for the region specific endpoint this request was sent to.'

Description

The solution to this problem is to recover the bucket location using s3api get-bucket-location and then use to query the right AWS region endpoint.

Also, I've improved the error handling logic.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jfagoagas jfagoagas requested review from a team, toniblyx, MrCloudSec and n4ch04 May 23, 2022 07:18
Copy link
Member

@MrCloudSec MrCloudSec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, it works!!

@MrCloudSec MrCloudSec merged commit e2c7bc2 into master May 23, 2022
@MrCloudSec MrCloudSec deleted the PRWLR-496-extra-771-bug-parse-error branch May 23, 2022 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants