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: always use regional S3 url #1588

Closed
wants to merge 1 commit into from

Conversation

demahum
Copy link

@demahum demahum commented Nov 7, 2022

SUMMARY

At the moment, command used to fetch AnsiballZ_setup.py from S3 bucket to remote has the following shape:

curl 'https://BUCKET-NAME.s3.amazonaws.com/PATH/IN/BUCKET/AnsiballZ_setup.py?X-Amz-Algorithm=REST_OF_PRESIGNED_URL' -o '/RANDOM/DESTINATION/file.py'

Above is not suitable for S3 buckets that are recently created and results in the response along the lines of:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>TemporaryRedirect</Code>
<Message>Please re-send this request to the specified temporary endpoint. Continue to use the original request endpoint for future requests.</Message>
<Endpoint>BUCKET-NAME.s3.REGION.amazonaws.com</Endpoint>
<Bucket>BUCKET-NAME</Bucket>
<RequestId>SOME-ID</RequestId>
<HostId>SOME-ID=</HostId>
</Error>

Resource related to the above behaviour:

https://stackoverflow.com/questions/56517156/s3-presigned-url-works-90-minutes-after-bucket-creation

This PR is attempting to fix the fact that at the moment, there is no way for this module to work with S3 buckets that are recently created. I am happy to hear any opinion on the topic, as long as this issue is resolved.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws ssm connection plugin

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review connection connection plugin needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) labels Nov 7, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ ansible-galaxy-importer SUCCESS in 4m 03s
✔️ build-ansible-collection SUCCESS in 5m 13s
ansible-test-sanity-docker-devel FAILURE in 8m 55s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 10m 18s
ansible-test-sanity-docker-stable-2.12 FAILURE in 12m 24s
ansible-test-sanity-docker-stable-2.13 FAILURE in 8m 49s
ansible-test-sanity-docker-stable-2.14 POST_FAILURE in 9m 34s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 00s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 22s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 16s
✔️ ansible-test-splitter SUCCESS in 2m 39s
integration-community.aws-1 FAILURE in 6m 22s
integration-community.aws-2 FAILURE in 5m 26s
integration-community.aws-3 FAILURE in 5m 28s
integration-community.aws-4 FAILURE in 5m 07s
integration-community.aws-5 FAILURE in 5m 19s
integration-community.aws-6 FAILURE in 6m 45s
integration-community.aws-7 FAILURE in 6m 17s
integration-community.aws-8 FAILURE in 6m 07s
integration-community.aws-9 FAILURE in 5m 07s
integration-community.aws-10 FAILURE in 8m 10s
integration-community.aws-11 FAILURE in 5m 09s
integration-community.aws-12 FAILURE in 6m 18s
integration-community.aws-13 FAILURE in 8m 52s
integration-community.aws-14 FAILURE in 5m 42s
integration-community.aws-15 FAILURE in 4m 52s
integration-community.aws-16 FAILURE in 5m 03s
integration-community.aws-17 FAILURE in 5m 09s
integration-community.aws-18 FAILURE in 5m 56s
integration-community.aws-19 FAILURE in 5m 16s
integration-community.aws-20 FAILURE in 5m 45s
integration-community.aws-21 FAILURE in 5m 01s
integration-community.aws-22 FAILURE in 4m 51s
ansible-test-changelog FAILURE in 2m 15s
✔️ noop SUCCESS in 0s

@demahum
Copy link
Author

demahum commented Nov 10, 2022

@tremble, I'm pinging you as you approved #1428.

What do you think about the direction here? We can work out the specifics, of course.

@tremble
Copy link
Contributor

tremble commented Jan 26, 2023

Closing this in favour of #1674

@tremble tremble closed this Jan 26, 2023
@tremble
Copy link
Contributor

tremble commented Jan 26, 2023

Thanks for taking the time to submit this PR. Rather than hard coding this we've added #1674 which asks botocore for the relevant endpoint for the region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review connection connection plugin needs_triage new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants