- Newest
- Most votes
- Most comments
The following bullet under Considerations in the EC2 User Guide might be helpful in your case:
In a container environment, set the hop limit to 2
The AWS SDKs use IMDSv2 calls by default. If the IMDSv2 call receives no response, the SDK retries the call and, if still unsuccessful, uses IMDSv1. This can result in a delay, especially in a container environment. In a container environment, if the hop limit is 1, the IMDSv2 response does not return because going to the container is considered an additional network hop. To avoid the process of falling back to IMDSv1 and the resultant delay, in a container environment we recommend that you set the hop limit to 2. For more information, see Configure the instance metadata options.
I'm not using the SDK here, just making direct HTTP calls to
http://169.254.169.254/latest/api/token
so I'm not sure the hop count is relevent.
Relevant content
- asked 3 years ago
- asked 3 years ago
- asked 2 years ago
