community.aws icon indicating copy to clipboard operation
community.aws copied to clipboard

SSM connection - set S3 addressing style

Open jfhovinne opened this issue 3 years ago • 7 comments

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 avatar Sep 17 '21 15:09 jfhovinne

@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.

116davinder avatar Sep 17 '21 22:09 116davinder

After investigation, I see that simply setting the addressing style fixes the issue, so we can use virtual instead.

jfhovinne avatar Sep 19 '21 20:09 jfhovinne

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 avatar Sep 23 '21 21:09 116davinder

@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.

jfhovinne avatar Oct 03 '21 12:10 jfhovinne

@116davinder Anything else blocking that PR?

jfhovinne avatar Nov 16 '21 09:11 jfhovinne

duplicate of https://github.com/ansible-collections/community.aws/pull/786 and definitely not generic. #786 is preferable. Could be closed

gillg avatar Jan 09 '22 13:01 gillg

The problem is that the issue is not fixed with #786 and default settings.

jfhovinne avatar Apr 26 '22 12:04 jfhovinne

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

tremble avatar Jan 20 '23 18:01 tremble