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

Improve AWS metadata retrieval by supporting IMDSv1 fallback #2214

Open
jinmay opened this issue Feb 7, 2025 · 0 comments
Open

Improve AWS metadata retrieval by supporting IMDSv1 fallback #2214

jinmay opened this issue Feb 7, 2025 · 0 comments
Labels
agent-python community Issues opened by the community triage Issues awaiting triage

Comments

@jinmay
Copy link

jinmay commented Feb 7, 2025

Is your feature request related to a problem? Please describe.
Currently, when retrieving AWS metadata, only IMDSv2 is supported. While IMDSv2 is more secure, it would be beneficial to also support IMDSv1 as an option.

Describe the solution you'd like
Attempt to request IMDSv2 first, and if it fails, fallback to IMDSv1. This approach ensures compatibility with environments where IMDSv2 is not enabled.

Describe alternatives you've considered
To request IMDSv2, an API token is required. The implementation will first request a token, and if it receives a 401 Unauthorized response, it will assume that IMDSv2 is disabled and proceed with an IMDSv1 request instead.
All requests will include up to five retries with exponential backoff.

Additional context

@github-actions github-actions bot added agent-python community Issues opened by the community triage Issues awaiting triage labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-python community Issues opened by the community triage Issues awaiting triage
Projects
None yet
Development

No branches or pull requests

1 participant