ansible-collections/amazon.aws

s3_bucket module always fails in AWS GovCloud

ichekaldin opened this issue · 0 comments

Summary

With the introduction of Transfer Acceleration support in #2046, s3_bucket module always fails in AWS GovCloud.

I believe this is due to get_bucket_accelerate_configuration API call here and the fact that Transfer Acceleration is not supported in GovCloud.

Issue Type

Bug Report

Component Name

s3_bucket

Ansible Version

$ ansible --version
ansible [core 2.17.1]
  config file = ~/.ansible.cfg
  configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = ~/.env/lib/python3.12/site-packages/ansible
  ansible collection location = ~/.ansible/collections
  executable location = ~/.env/bin/ansible
  python version = 3.12.4 (main, Jun  6 2024, 18:26:44) [Clang 15.0.0 (clang-1500.3.9.4)]   jinja version = 3.1.3
  libyaml = True

Collection Versions

$ ansible-galaxy collection list
Collection            Version
--------------------- -------
amazon.aws            8.0.1  
ansible.netcommon     5.1.1  
ansible.posix         1.5.4  
ansible.utils         2.10.3 
community.aws         8.0.0  
community.general     9.1.0  

AWS SDK versions

$ pip show boto boto3 botocore
Name: boto3
Version: 1.34.138
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email: 
License: Apache License 2.0
Location: ~/.env/lib/python3.12/site-packages
Requires: botocore, jmespath, s3transfer
Required-by: 
---
Name: botocore
Version: 1.34.138
Summary: Low-level, data-driven core of boto 3.
Home-page: https://github.com/boto/botocore
Author: Amazon Web Services
Author-email: 
License: Apache License 2.0
Location: ~/.env/lib/python3.12/site-packages
Requires: jmespath, python-dateutil, urllib3
Required-by: boto3, s3transfer

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Steps to Reproduce

- amazon.aws.s3_bucket:
    name: MyBucket
    state: present

Expected Results

Bucket is created, or no changes are made if the bucket already exists.

Actual Results

Failed to fetch bucket transfer acceleration state: An error occurred (UnsupportedArgument) when calling the GetBucketAccelerateConfiguration operation: The request contained an unsupported argument.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct