-
Notifications
You must be signed in to change notification settings - Fork 398
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_sync module does not function with bucket shared across multiple was accounts. #58
Comments
Files identified in the description: If these files are inaccurate, please update the |
Thanks for taking the time to open this issue. I'm sorry it's taken so long to respond. The issue is actually more generic than being "cross-account", we attempt to describe the existing file prior to uploading, if permissions don't allow #1330 includes a change which should fix the issue you're seeing. |
s3_sync - Improve error handling when testing for existing files SUMMARY fixes: #58 Simplifies handling of '404' codes (use is_boto3_error_code) Assume 403 files need updating (it's the best we can do, and mimics aws cli) Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception() ISSUE TYPE Feature Pull Request COMPONENT NAME s3_sync ADDITIONAL INFORMATION Reviewed-by: Joseph Torcasso <None>
s3_sync - Improve error handling when testing for existing files SUMMARY fixes: #58 Simplifies handling of '404' codes (use is_boto3_error_code) Assume 403 files need updating (it's the best we can do, and mimics aws cli) Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception() ISSUE TYPE Feature Pull Request COMPONENT NAME s3_sync ADDITIONAL INFORMATION Reviewed-by: Joseph Torcasso <None> (cherry picked from commit 40984a4)
s3_sync - Improve error handling when testing for existing files SUMMARY fixes: #58 Simplifies handling of '404' codes (use is_boto3_error_code) Assume 403 files need updating (it's the best we can do, and mimics aws cli) Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception() ISSUE TYPE Feature Pull Request COMPONENT NAME s3_sync ADDITIONAL INFORMATION Reviewed-by: Joseph Torcasso <None> (cherry picked from commit 40984a4)
…) (#1335) [PR #1330/40984a40 backport][stable-4] s3_sync - Improve error handling when testing for existing files This is a backport of PR #1330 as merged into main (40984a4). SUMMARY fixes: #58 Simplifies handling of '404' codes (use is_boto3_error_code) Assume 403 files need updating (it's the best we can do, and mimics aws cli) Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception() ISSUE TYPE Feature Pull Request COMPONENT NAME s3_sync ADDITIONAL INFORMATION Reviewed-by: Mark Chappell <None>
…) (#1334) [PR #1330/40984a40 backport][stable-3] s3_sync - Improve error handling when testing for existing files This is a backport of PR #1330 as merged into main (40984a4). SUMMARY fixes: #58 Simplifies handling of '404' codes (use is_boto3_error_code) Assume 403 files need updating (it's the best we can do, and mimics aws cli) Allows Boto3 exceptions to fall through to the outer try/except clause and cleanly fail rather than rethrowing it as an Exception() ISSUE TYPE Feature Pull Request COMPONENT NAME s3_sync ADDITIONAL INFORMATION Reviewed-by: Mark Chappell <None>
SUMMARY
Doing the s3 sync operation in a shell, as the same user, has no problem, but the s3_sync module in ansible errors with:
Bug Report
COMPONENT NAME
s3_sync
ANSIBLE VERSION
ansible 2.9.7
CONFIGURATION
OS / ENVIRONMENT
Ununtu 16.04
STEPS TO REPRODUCE
In this example I show the playbook which can run the s3 sync operation as a shell fine, but using the ansible module fails.
The playbook:
The only thing slightly diffferent in this scenario to others I have had success with is that the bucket allows access to two AWS accounts. the pemissions on the bucket are:
I have replaced the user id's in this log with a random number, but in both tests, they match.
EXPECTED RESULTS
s3_sync should function the same as the shell command.
ACTUAL RESULTS
Here is the error:
You can see that the bash shell operation has no problem, only the s3_sync module does.
The text was updated successfully, but these errors were encountered: