LoginSignup
2
1

More than 5 years have passed since last update.

EC2インスタンス自身のメタ情報を取得する方法

Posted at

AWSインスタンス自身のメタ情報を取得する

参考: http://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/ec2-instance-metadata.html

取得できる項目の一覧

curl http://169.254.169.254/latest/meta-data/

例) ローカルIPを取得

curl http://169.254.169.254/latest/meta-data/local-ipv4

例) パブリックIPを取得

curl http://169.254.169.254/latest/meta-data/public-ipv4

自作のスクリプトへ組み込んで有効活用したい

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1