-
Notifications
You must be signed in to change notification settings - Fork 48
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
fix(s3): retry on token expired when downloading from s3 #1583
Conversation
Binary incompatibility detected for commit f505369. com.aws.greengrass.status.model.Trigger is binary incompatible and is source incompatible because of FIELD_REMOVED Produced by binaryCompatability.py |
Unit Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against f505369 |
Integration Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against f505369 |
Issue #, if available:
Description of changes:
aws/aws-sdk-java-v2#3408.
S3 may throw an error on expired credentials which the client does not handle correctly internally. We need to handle this special case ourselves, and unfortunately we need to check the error message to do it. This change rethrows the expired token error as a retryable exception which will make us get new credentials and then attempt the S3 call again.
Why is this change necessary:
How was this change tested:
Any additional information or context required to review the change:
Documentation Checklist:
Compatibility Checklist:
any deprecated method or type.
Refer to Compatibility Guidelines for more information.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.