kislyuk / aegea

Amazon Web Services Operator Interface
Apache License 2.0
68 stars 17 forks source link

IMDSv2 compatibility #70

Open kislyuk opened 3 years ago

kislyuk commented 3 years ago

git grep 169.254

python3 -c 'import sys, botocore.utils as b; i=b.IMDSFetcher(); i._get_request(sys.argv[1], None, i._fetch_metadata_token()).text' latest/meta-data/hostname

aegea_imds(){ python3 -c 'import sys, botocore.utils as b; i=b.IMDSFetcher(); print(i._get_request(sys.argv[1], None, i._fetch_metadata_token()).text)' $@; }