{"id":15825,"date":"2016-02-01T13:55:00","date_gmt":"2016-02-01T04:55:00","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=15825"},"modified":"2019-05-13T17:50:03","modified_gmt":"2019-05-13T08:50:03","slug":"post15825","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2016\/02\/15825\/","title":{"rendered":"AWS EC2 \u3067\u306e\u6700\u5f37\u306e Public IP \u53d6\u5f97\u65b9\u6cd5"},"content":{"rendered":"<h1>\u6982\u8981<\/h1>\n<p>AWS EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e Public IP \u306f\u8d77\u52d5\u6bce\u306b\u5909\u308f\u3063\u3066\u3057\u307e\u3044\u3001 ssh \u3084 curl \u30b3\u30de\u30f3\u30c9\u306b\u4e0e\u3048\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u6bce\u56de\u78ba\u8a8d\u3059\u308b\u306e\u306b\u56f0\u3063\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<\/p>\n<p>\u7279\u306b\u5e38\u6642\u8d77\u52d5\u3057\u306a\u3044\u691c\u8a3c\u3084\u958b\u767a\u306e\u305f\u3081\u306e\u74b0\u5883\u3001 Auto Scaling \u306b\u4f9d\u5b58\u3057\u305f\u74b0\u5883\u3068\u76f8\u6027\u304c\u60aa\u3044\u3068\u601d\u308f\u308c\u307e\u3059\u3002<\/p>\n<h3>\u3088\u304f\u3042\u308b\u624b\u6cd5\uff11\u3001EIP \u3092\u4ed8\u4e0e\u3059\u308b\u3002<\/h3>\n<p>\u3057\u304b\u3057 EIP \u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8d77\u52d5\u3057\u3066\u306a\u3044\u9593\u306b\u8cbb\u7528\u304c\u304b\u304b\u308a\u3001\u983b\u7e41\u306b Stop \u3057\u305f\u308a\u65b0\u898f\u8ffd\u52a0\u3059\u308b\u306e\u306b\u5411\u3044\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<h3>\u3088\u304f\u3042\u308b\u624b\u6cd5\uff12\u3001 Route53 \u3092\u5229\u7528\u3059\u308b\u3002<\/h3>\n<p>Route53 \u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u5bfe\u7167\u306b\u306a\u308b\u540d\u524d\u3092\u4e0e\u3048\u3001 Lambda \u7b49\u3067\u5b9a\u671f\u7684\u306b\u66f4\u65b0\u3059\u308c\u3070 IP \u30a2\u30c9\u30ec\u30b9\u3092\u610f\u8b58\u305b\u305a\u306b\u6e08\u307f\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057 Public Hosted Zone \u306e\u8cbb\u7528\u304c\u639b\u304b\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002 Lambda \u66f4\u65b0\u9593\u9694\u3084 TTL \u3067\u306e\u30bf\u30a4\u30e0\u30e9\u30b0\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u3088\u304f\u3042\u308b\u624b\u6cd5\uff13\u3001 AWS CLI \u3092 ssh \u7b49\u3067\u30e9\u30c3\u30d7\u3059\u308b<\/h3>\n<p>\u5229\u7528\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3092\u3059\u3079\u3066\u30e9\u30c3\u30d7\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001 AWS EC2 \u4ee5\u5916\u3068\u306e\u4f7f\u3044\u5206\u3051\u306b\u3082\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n<h1>\u6700\u5f37\u306e\u89e3\u6c7a\u65b9\u6cd5<\/h1>\n<p>libnss_ec2 \u3092\u4f7f\u3046\u3053\u3068\u3067\u9054\u6210\u3067\u304d\u307e\u3059\u3002\u8cbb\u7528\u304c\u639b\u304b\u3089\u305a\u3001\u30bf\u30a4\u30e0\u30e9\u30b0\u3082\u7121\u304f\u3001\u30b3\u30de\u30f3\u30c9\u306e\u30e9\u30c3\u30d7\u7b49\u3082\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/wates\/libnss_ec2\">https:\/\/github.com\/wates\/libnss_ec2<\/a><\/li>\n<\/ul>\n<p>EC2 Launch \u6642\u307e\u305f\u306f\u3001 Instances \u306e\u4e00\u89a7\u304b\u3089 Name \u30bf\u30b0\u3092\u8a2d\u5b9a\u3055\u3048\u3059\u308b\u3053\u3068\u3067\u3001\u3059\u3050\u306b\u53cd\u5fdc\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2016\/02\/ec2_name_tag.png\" alt=\"ec2_name_tag\" width=\"274\" height=\"102\" class=\"alignnone size-full wp-image-15826\" \/><\/p>\n<p>ping \u3084 ssh \u306f\u3082\u3061\u308d\u3093 curl \u3082\u30d0\u30c3\u30c1\u30ea\u624b\u9593\u3044\u3089\u305a\u3067\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true \" >$ ping horiguchi-dev\nPING horiguchi-dev (52.68.***.***) 56(84) bytes of data.\n...\n\n$ ssh horiguchi-dev\nThe authenticity of host 'horiguchi-dev (52.68.***.***)' can't be established.\nECDSA key fingerprint is 09:29:ae:52:**:**:**:**:**:**:**:**:**:**:**:**.\n...\n\n $ curl -v horiguchi-dev\n* Rebuilt URL to: horiguchi-dev\/\n* Hostname was NOT found in DNS cache\n*   Trying 52.68.***.***...\n* Connected to horiguchi-dev (52.68.***.***) port 80 (#0)\n> GET \/ HTTP\/1.1\n...\n<\/pre>\n<p>\u305d\u308c\u3067\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u30b0\u30eb\u30fc\u30d7\u306b\u306f\u6c17\u3092\u4ed8\u3051\u3066\u3054\u5229\u7528\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 AWS EC2 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e Public IP \u306f\u8d77\u52d5\u6bce\u306b\u5909\u308f\u3063\u3066\u3057\u307e\u3044\u3001 ssh \u3084 curl \u30b3\u30de\u30f3\u30c9\u306b\u4e0e\u3048\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u6bce\u56de\u78ba\u8a8d\u3059\u308b\u306e\u306b\u56f0\u3063\u3066\u3044\u307e\u305b\u3093\u304b\uff1f \u7279\u306b\u5e38\u6642\u8d77\u52d5\u3057\u306a\u3044\u691c\u8a3c\u3084\u958b\u767a\u306e\u305f\u3081\u306e\u74b0\u5883\u3001 Aut [&hellip;]<\/p>\n","protected":false},"author":101,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[114,112,19],"class_list":["post-15825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-aws","tag-ec2","tag-19"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/15825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/101"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=15825"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/15825\/revisions"}],"predecessor-version":[{"id":15840,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/15825\/revisions\/15840"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=15825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=15825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=15825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}