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

Added support for IMDSv2 and Amazon S3 OneZone Express #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cmilanf
Copy link

@cmilanf cmilanf commented Jan 19, 2024

This PR includes a pair of commits:

  1. Upgrades the usage of Instance Metadata Service to v2. v2 requires to authenticate each call with a token that is requested via the getToken() function. It also upgrades AWS Go SDK v2 version to 1.24.1. This commit is based in the changes proposed by Update to aws-sdk-go-v2 1.6.0 #25.
  2. Adds main-express.go file, that is a duplicate of main.go, but with the code modified to benchmark the new Amazon S3 Express OneZone specifically.

Added support for Amazon EC2 Instance Metadata Service v2. Upgraded aws-sdk-go-v2 to 1.24.1, aws-sdk-go-v2-config to 1.26.4 and aws-sdk-go-v2-s3 to 1.48.0. Based on Kuenishi Pull Request dvassallo#25 at dvassallo#25
@cmilanf cmilanf changed the title Added support for IMSv2 and Amazon S3 OneZone Express Added support for IMDSv2 and Amazon S3 OneZone Express Jan 19, 2024
@ekaynar
Copy link

ekaynar commented Apr 15, 2024

@cmilanf Does the code automatically renew the token when it expires?

@cmilanf
Copy link
Author

cmilanf commented Apr 15, 2024

@ekaynar No, it generates a token in the getToken() function with a TTL of 21600 seconds (that's a default value). As the IMDSv2 is only used to retrieve details from the instance (availability zone, region, instance type...), you only need just a few seconds to get the information and then proceed to the benchmark, you shouldn't need to renew the token unless you are implementing a different use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants