Skip to content

Commit

Permalink
Update AWS IMDSv1 calls to IMDSv2 in fbcode/torchsnapshot/github/.git…
Browse files Browse the repository at this point in the history
…hub/workflows (#181)

Summary: Pull Request resolved: #181

Differential Revision: D65188986
  • Loading branch information
CodemodService Bot authored and facebook-github-bot committed Nov 4, 2024
1 parent f98742e commit 4adbbb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
# Pulled from instance metadata endpoint for EC2
# see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
category=$1
curl -fsSL "http://169.254.169.254/latest/meta-data/${category}"
curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}"
}
echo "ami-id: $(get_ec2_metadata ami-id)"
echo "instance-id: $(get_ec2_metadata instance-id)"
Expand Down

0 comments on commit 4adbbb3

Please sign in to comment.