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
Describe the bug
Changing access keys on a regular schedule is a well-known security best practice. But the S3 replication plugin can't work properly and would keep throwing 403 errors for days each time I rotate my access keys.
To Reproduce
Follow the DEPLOYMENT_EN.md to install the S3 replication plugin and verify that it works fine.
Create new access keys and delete the old access keys.
Update the latest AK/SK values to the secret from step 1.
Make some changes to the source bucket, and you will notice that the replication stops working.
Go to the log of the instance, and you will see an error log like this:
2022/08/01 03:16:17 S3> Got an error uploading file - operation error S3: PutObject, https response error StatusCode: 403, RequestID: xxxxxxxx, HostID: xxxxxxxx, api error InvalidAccessKeyId: The AWS Access Key Id you provided does not exist in our records.
2022/08/01 03:16:17 ----->Transferred 1 object xxxxxxxx/xxxxxxxx.json with status ERROR
Terminate the active instance in ASG, and wait for the new instance to be ready. Then you will see the replication works fine again.
So the cache of outdated credentials in the instance caused this problem.
Expected behavior
After a few failed attempts, the instance should try to pull the latest credentials from the secret manager instead of keep trying with outdated credentials in the cache.
Please complete the following information about the solution:
Version:
(SO8002) - Data Transfer Hub - S3 Plugin - Template version v1.0.0
Region: Any
Was the solution modified from the version published on this repository?
No
If the answer to the previous question was yes, are the changes available on GitHub?
Have you checked your service quotas for the services this solution uses?
Yes, it's not relevant
Were there any errors in the CloudWatch Logs?
Yes. Please see above in the Reproduce section.
Changing access keys on a regular schedule is a well-known security best practice. But the S3 replication plugin can't work properly and would keep throwing 403 errors for days each time I rotate my access keys.
To Reproduce
So the cache of outdated credentials in the instance caused this problem.
Expected behavior
After a few failed attempts, the instance should try to pull the latest credentials from the secret manager instead of keep trying with outdated credentials in the cache.
Please complete the following information about the solution:
(SO8002) - Data Transfer Hub - S3 Plugin - Template version v1.0.0
No
Yes, it's not relevant
Yes. Please see above in the Reproduce section.
Screenshots
None
Additional context
None