community.aws
community.aws copied to clipboard
SSM connection - set S3 addressing style
SUMMARY
Fixes #705
ISSUE TYPE
- Bugfix Pull Request
COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
I confirm the connection issue described in #705 (I got the redirect error multiple times with different accounts + new buckets), which is fixed by applying the proposed patch, i.e. using the 'path' addressing style.
@jfhovinne, you would need to write doc fragment + test case if possible. example: https://github.com/ansible-collections/community.aws/blob/main/changelogs/fragments/499-elb-module-add-ip_address_type_option.yml
The integration test case will be great.
After investigation, I see that simply setting the addressing style fixes the issue, so we can use virtual
instead.
After investigation, I see that simply setting the addressing style fixes the issue, so we can use
virtual
instead.
Can you try with auto
option instead of virtual
?
addressing_style: The S3 addressing style. When necessary, Boto automatically switches the addressing style to an appropriate value. The following values are supported.
auto
(Default) Attempts to use virtual, but falls back to path if necessary.
path
Bucket name is included in the URI path.
virtual
Bucket name is included in the hostname.
ref: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#using-a-configuration-file
I believe, the best option is to take an extra parameter for it and auto
as the default option.
@tremble / @markuman / @jillr , any suggestions for this issue?
@116davinder The connection issue still occurs when setting the addressing style to auto
.
Also I was suggesting virtual
instead of path
because path
may be deprecated by AWS in the future.
@116davinder Anything else blocking that PR?
duplicate of https://github.com/ansible-collections/community.aws/pull/786 and definitely not generic. #786 is preferable. Could be closed
The problem is that the issue is not fixed with #786 and default settings.
Thanks for taking the time to open this PR.
#1633 has now been merged which should add this functionality to release 5.2.0 of this collection