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

iam role (access token) is refreshed for every s3 request #1117

Closed
fviard opened this issue Jun 27, 2020 · 1 comment · Fixed by #1118
Closed

iam role (access token) is refreshed for every s3 request #1117

fviard opened this issue Jun 27, 2020 · 1 comment · Fixed by #1118
Milestone

Comments

@fviard
Copy link
Contributor

fviard commented Jun 27, 2020

iam role (access token) is refreshed for every s3 request , and so, that can result in a lot slower operations as a request for credential has to be done each time, even if access token is not expired.

A nice fix would be to take into account the expiration date of the token, to only refresh it when it is needed.

@fviard fviard added this to the 2.2.0 milestone Jun 27, 2020
Patouche added a commit to Patouche/s3cmd that referenced this issue Jun 27, 2020
Fix http call on role endpoint to retrieve the token each time the role_refresh in invoke
fviard added a commit that referenced this issue Jun 27, 2020
[#1117] Improve speed when running on EC2 instance
@fviard
Copy link
Contributor Author

fviard commented Jun 27, 2020

Here are the results of a benchmark I did with python3:
For around 16k files of a typical "/usr/share" directory:

  • With @Patouche fix: 17min 34s
  • Without: 20min 21s

👍

fviard added a commit that referenced this issue Jun 27, 2020
#1117 Fix timezone on old python version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant