{"height":"190","description":"aws ec2 describe-instances \u304c\u8fd4\u3059 json \u3092 parse \u3057\u3066\u3001 /etc/hosts \u306b private ip, name tag \u3092\u8ffd\u8a18\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059(name tag \u3092 hostname \u3068\u3057\u3066\u308b\u5834\u5408\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059)\u3002 aws configure \u3092\u3057\u3066\u3044\u308b\u524d\u63d0\u3067\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u3001 \u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f\u3001\u9069\u5b9c region, access key, secret key \u3092\u5f15\u6570\u306b\u53d6\u308c\u3070\u52d5\u304f\u306f\u305a\u3067\u3059\u3002 fp.write \u306e\u90e8\u5206\u3092 print \u306b\u66f8\u304d\u63db\u3048\u3066\u8868\u793a\u3059\u308b\u3060\u3051\u306b\u3057\u305f\u308a\u3001 i.get('InstanceId') \u3092\u8ffd\u52a0\u3057\u3066\u3001instance id \u3092\u8868\u793a\u2026","title":"ec2 instance \u306e name tag \u3068 private ip \u3092 /etc/hosts \u306b\u8ffd\u8a18\u3059\u308b","width":"100%","provider_url":"https://hatena.blog","author_name":"tkuchiki","provider_name":"Hatena Blog","blog_url":"https://tkuchiki.hatenablog.com/","published":"2014-05-31 01:10:38","author_url":"https://blog.hatena.ne.jp/tkuchiki/","blog_title":"tkuchiki\u306e\u65e5\u8a18","type":"rich","url":"https://tkuchiki.hatenablog.com/entry/2014/05/31/011038","categories":["AWS","CLI","\u30b3\u30de\u30f3\u30c9","python"],"version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftkuchiki.hatenablog.com%2Fentry%2F2014%2F05%2F31%2F011038\" title=\"ec2 instance \u306e name tag \u3068 private ip \u3092 /etc/hosts \u306b\u8ffd\u8a18\u3059\u308b - tkuchiki\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null}