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
IMDSv2 uses session-oriented requests. With session-oriented requests, you create a session token that defines the session duration, which can be a minimum of one second and a maximum of six hours. During the specified duration, you can use the same session token for subsequent requests. After the specified duration expires, you must create a new session token to use for future requests.
In fromInstanceMetadata, the token is fetched in every call.
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Is your feature request related to a problem? Please describe.
From How Instance Metadata Service Version 2 works
In
fromInstanceMetadata
, the token is fetched in every call.aws-sdk-js-v3/packages/credential-provider-imds/src/fromInstanceMetadata.ts
Lines 58 to 61 in 4f02b78
Describe the solution you'd like
Cache IMDS metadata token till it expires, thus reducing the number of calls to metadata service.
Describe alternatives you've considered
Request customers to write custom implementation of
fromInstanceMetadata
which caches token.Additional context
The feature request came up while debugging retry strategy options for RemoteProviderConfig requested in #2706
The text was updated successfully, but these errors were encountered: