diff --git a/changelogs/fragments/722-ssm_connection-s3_addressing_style.yml b/changelogs/fragments/722-ssm_connection-s3_addressing_style.yml new file mode 100644 index 00000000000..d40e34773ea --- /dev/null +++ b/changelogs/fragments/722-ssm_connection-s3_addressing_style.yml @@ -0,0 +1,2 @@ +bugfixes: +- aws_ssm - set S3 addressing style to avoid redirects (https://github.com/ansible-collections/community.aws/pull/722). diff --git a/plugins/connection/aws_ssm.py b/plugins/connection/aws_ssm.py index c0c64046ec6..0d0789cfdba 100644 --- a/plugins/connection/aws_ssm.py +++ b/plugins/connection/aws_ssm.py @@ -540,7 +540,7 @@ def _get_boto_client(self, service, region_name=None, profile_name=None): client = session.client( service, - config=Config(signature_version="s3v4") + config=Config(signature_version='s3v4', s3={'addressing_style': 'virtual'}) ) return client