Closed shikharbhardwaj closed 3 years ago
Tried to run the detection on a Sagemaker instance, the response keys seem to have changed (case mismatch):
curl http://169.254.169.254/latest/dynamic/instance-identity/document { ... "imageId" : "ami-08xxxxxxxxxxx", "instanceId" : "i-00xxxxxxxxxxxx", ... }
Also, the Azure detection does not check the response code, and thus ends up being falsely detected in this case instead of unknown (since the metadata server does exist at the same IP).
unknown
https://github.com/dgzlopes/cloud-detect/blob/0eac0b4ef6480f8b1e054db22e5ee8c641e39422/cloud_detect/providers/azure_provider.py#L33
Hey :)
Good catches, thanks!
I changed the cases on the AWS provider, merged a PR that had a fix for the Azure problem, and created a new release.
Hopefully everything works fine now.
Tried to run the detection on a Sagemaker instance, the response keys seem to have changed (case mismatch):
Also, the Azure detection does not check the response code, and thus ends up being falsely detected in this case instead of
unknown
(since the metadata server does exist at the same IP).https://github.com/dgzlopes/cloud-detect/blob/0eac0b4ef6480f8b1e054db22e5ee8c641e39422/cloud_detect/providers/azure_provider.py#L33