Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3_bucket module always fails in AWS GovCloud #2180

Closed
1 task done
ichekaldin opened this issue Jul 2, 2024 · 0 comments · Fixed by #2194
Closed
1 task done

s3_bucket module always fails in AWS GovCloud #2180

ichekaldin opened this issue Jul 2, 2024 · 0 comments · Fixed by #2194
Labels

Comments

@ichekaldin
Copy link
Contributor

ichekaldin commented Jul 2, 2024

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
patchback bot pushed a commit that referenced this issue Jul 23, 2024
SUMMARY

Closes #2180
Transfer acceleration is not available for AWS GovCloud region, this PR performs the following changes

GetBucketAccelerateConfiguration operation is performed only if the user has provided accelerate_enabled option
When GetBucketAccelerateConfiguration raises an UnsupportedArgument botocore exception, the module will display a warning message
accelerate_enabled is set in the output only if it was provided as input

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

s3_bucket

Reviewed-by: Mike Graves <[email protected]>
Reviewed-by: Mandar Kulkarni <[email protected]>
Reviewed-by: Bikouo Aubin
Reviewed-by: Helen Bailey <[email protected]>
(cherry picked from commit 7d6a5ef)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Aug 28, 2024
…#2202)

This is a backport of PR #2194 as merged into main (7d6a5ef).
SUMMARY

Closes #2180
Transfer acceleration is not available for AWS GovCloud region, this PR performs the following changes

GetBucketAccelerateConfiguration operation is performed only if the user has provided accelerate_enabled option
When GetBucketAccelerateConfiguration raises an UnsupportedArgument botocore exception, the module will display a warning message
accelerate_enabled is set in the output only if it was provided as input


ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

s3_bucket

Reviewed-by: Mark Chappell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants