Skip to content

Commit f4b6511

Browse files
committed
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 e5dab2e commit f4b6511

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
@@ -240,7 +240,9 @@ The auth libraries and applications **must** follow the steps below:
240240
**imdsv2_session_token_url** fields if they are provided. The host should
241241
either be **169.254.169.254** or **fd00:ec2::254**.
242242
- If **imdsv2_session_token_url** is available, then fetch session token
243-
from **imdsv2_session_token_url**.
243+
from **imdsv2_session_token_url**. Note: only perform this step if you
244+
need to communicate with the metadata server to fetch the region and/or
245+
the security credentials
244246
- Check the environment variables in the following order (`AWS_REGION` and
245247
then the `AWS_DEFAULT_REGION`) to determine the AWS region. If found, skip
246248
using the AWS metadata server to determine this value.

0 commit comments

Comments
 (0)