You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use a single organization bucket for cross-account connection, the aws_ssm connection plugin fails with
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the GetBucketLocation operation: Access Denied
This happens even though the assumed role has the s3:GetBucketLocation permission granted (we have double checked, s3:* in the role and explicit s3:GetBucketLocation in the bucket policy).
The root of the issue is that, according to the CLI help,
To use this implementation of the operation, you must be the bucket owner.
The online API documentation does not mention it, although it says the call is supported only for backwards compatibility and advises the usage of HeadBucket.
Switching to HeadBucket API call would involve changin the code from
PLAY [all] *********************************************************************TASK [Gathering Facts] *********************************************************An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the GetBucketLocation operation: Access Deniedfatal: [i-00a8cb5930bd5f7dc]: FAILED! => {"msg": "Unexpected failure during module execution: An error occurred (AccessDenied) when calling the GetBucketLocation operation: Access Denied", "stdout": ""}PLAY RECAP *********************************************************************i-00a8cb5930bd5f7dc : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Code of Conduct
I agree to follow the Ansible Code of Conduct
The text was updated successfully, but these errors were encountered:
raulpedroche
added a commit
to raulpedroche/community.aws
that referenced
this issue
Oct 25, 2023
Summary
When trying to use a single organization bucket for cross-account connection, the aws_ssm connection plugin fails with
This happens even though the assumed role has the s3:GetBucketLocation permission granted (we have double checked, s3:* in the role and explicit s3:GetBucketLocation in the bucket policy).
The root of the issue is that, according to the CLI help,
The online API documentation does not mention it, although it says the call is supported only for backwards compatibility and advises the usage of HeadBucket.
Switching to HeadBucket API call would involve changin the code from
to something like
Issue Type
Bug Report
Component Name
aws_ssm
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Debian GNU/Linux 12 (bookworm)
Steps to Reproduce
Expected Results
Expected playbook to run to end.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: