-
Notifications
You must be signed in to change notification settings - Fork 13
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
AWS IMDSv2 not supported #27
Comments
There are also some alternatives that I can think of, like looking to see if one of these directories exists
Also according to this https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/identify_ec2_instances.html, we can also use |
@arossert I think this package was never tested on Window VMs. Even the CI only covers Ubuntu. |
Since this lib is using the metadata API I will assume this can also happen in Linux if only V2 is supported. |
@dgzlopes @kshivakumar Any suggestions on this issue? I'm using it to detect if running on cloud for multiple OS (Windows + Linux). Also I have a Linux instance that does return 401 error without the authentication token I can give some suggestions:
I'm willing to create a PR on any of these suggestions If this module is only intended for Linux, it should be in the project details. |
I created a pull request, can you consider adding this? |
Resolved by #28 |
I have an issue that I'm getting 'unknown' even when on an
AWS
instance (windows).It seems that the API for
http://169.254.169.254/latest/dynamic/instance-identity/document
is returning a 401 status code.According to the documentation we need first to acquire a token and then to the call instance-metadata-returns
You can look at this project to see how it is implemented in here https://pypi.org/project/ec2-metadata/
The text was updated successfully, but these errors were encountered: