Skip to content

Commit de65f87

Browse files
fix: IMDSV2 token should only be fetched if needed
No need to fetch the token if environment variables for both the region and the security credentials have been provided.
1 parent 1d00cd0 commit de65f87

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

aip/auth/4117.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ The auth libraries and applications **must** follow the steps below:
237237
error, trigger an error that the auth library needs to be updated to handle
238238
this type of credentials.
239239
- If **imdsv2_session_token_url** is available, then fetch session token
240-
from **imdsv2_session_token_url**.
240+
from **imdsv2_session_token_url**. Note: only perform this step if you
241+
need to communicate with the metadata server to fetch the region and/or
242+
the security credentials
241243
- Check the environment variables in the following order (`AWS_REGION` and
242244
then the `AWS_DEFAULT_REGION`) to determine the AWS region. If found, skip
243245
using the AWS metadata server to determine this value.

0 commit comments

Comments
 (0)