Skip to content

Instantly share code, notes, and snippets.

@s2504s
Last active December 2, 2022 09:07
Show Gist options
  • Select an option

  • Save s2504s/c9488fa190aff0c48fccbee4c0a71325 to your computer and use it in GitHub Desktop.

Select an option

Save s2504s/c9488fa190aff0c48fccbee4c0a71325 to your computer and use it in GitHub Desktop.
Get user-data from metadata
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` \
&& curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/user-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment