From 299cb5fff372ce2dd9a7153bb1ee750c72c3cf25 Mon Sep 17 00:00:00 2001 From: jfhovinne Date: Sat, 18 Sep 2021 18:54:18 +0200 Subject: [PATCH] Use S3 path addressing style --- changelogs/fragments/722-ssm_connection-s3_path.yml | 2 ++ plugins/connection/aws_ssm.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/722-ssm_connection-s3_path.yml diff --git a/changelogs/fragments/722-ssm_connection-s3_path.yml b/changelogs/fragments/722-ssm_connection-s3_path.yml new file mode 100644 index 00000000000..254989f4fa3 --- /dev/null +++ b/changelogs/fragments/722-ssm_connection-s3_path.yml @@ -0,0 +1,2 @@ +bugfixes: +- aws_ssm - use S3 ``path`` 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..4c1ae63ca0a 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': 'path'}) ) return client