{"id":12569,"date":"2020-12-29T16:43:33","date_gmt":"2020-12-29T07:43:33","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=12569"},"modified":"2023-05-27T18:10:53","modified_gmt":"2023-05-27T09:10:53","slug":"%e3%80%90aws%e3%80%91%e3%80%8ccloudformation%e3%80%8d%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=12569","title":{"rendered":"\u3010AWS\u3011\u300cCloudFormation\u300d\u306e\u6982\u8981\u3001\u66f8\u304d\u65b9"},"content":{"rendered":"<h2>CloudFormation\u3068\u306f\uff1f<\/h2>\n<p>EC2\u3084ELB\u3068\u3044\u3063\u305fAWS\u30b5\u30fc\u30d3\u30b9\u306e\u74b0\u5883\u69cb\u7bc9\u3092\u81ea\u52d5\u5316\u3067\u304d\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002<\/p>\n<p>\u69cb\u7bc9\u5f8c\u3059\u3050\u306b\u30ea\u30bd\u30fc\u30b9\u304c\u7a3c\u50cd\u3057\u59cb\u3081\u307e\u3059\u3002\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u5909\u66f4\u3055\u308c\u305f\u304b\u5909\u66f4\u3055\u308c\u3066\u306a\u3044\u304b\u81ea\u52d5\u3067\u5224\u65ad\u3057\u307e\u3059\u3002\u4f5c\u6210\u3057\u305f\u30b9\u30bf\u30c3\u30af\u81ea\u4f53\u306b\u306f\u8ab2\u91d1\u3055\u308c\u307e\u305b\u3093\u304c\u30b9\u30bf\u30c3\u30af\u3067\u4f5c\u6210\u3055\u308c\u305f\u30ea\u30bd\u30fc\u30b9\u81ea\u4f53\u306b\u306f\u8ab2\u91d1\u3055\u308c\u308b\u306e\u3067\u6c17\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u80cc\u666f<\/h2>\n<ul>\n<li>\u540c\u3058\u3088\u3046\u306a\u74b0\u5883\u3092\u8907\u6570\u69cb\u7bc9\u3059\u308b\u30cb\u30fc\u30ba\u304c\u591a\u3044\u305f\u3081\u3002\uff08\u958b\u767a\u74b0\u5883\u3001\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u74b0\u5883\u3001\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u74b0\u5883\u306a\u3069\uff09<\/li>\n<li>\u5fc5\u8981\u306a\u6642\u306b\u30ea\u30bd\u30fc\u30b9\u3092\u7528\u610f\u3057\u3066\u3001\u4e0d\u8981\u306b\u306a\u3063\u305f\u3089\u3059\u3050\u306b\u7834\u68c4\u3057\u305f\u3044\u3068\u3044\u3046\u30cb\u30fc\u30ba\u304c\u3042\u308b\u3002<\/li>\n<\/ul>\n<h2>\u30e1\u30ea\u30c3\u30c8<\/h2>\n<ul>\n<li>\u5909\u66f4\u5185\u5bb9\u304c\u7ba1\u7406\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/li>\n<li>\u5909\u66f4\u5185\u5bb9\u304c\u898b\u3084\u3059\u3044\u3002<\/li>\n<\/ul>\n<h2>\u5fc5\u8981\u306a\u30b9\u30ad\u30eb<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u300c\u4e16\u754c\u4e2d\u306e\u30c8\u30c3\u30d7\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u516c\u958b\u3057\u3066\u3044\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u300d<\/strong><\/span>\u3092\u7406\u89e3\u3057\u3066\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u30b9\u30ad\u30eb<\/p>\n<h2>\u57fa\u672c\u6a5f\u80fd<\/h2>\n<h3>\u4f5c\u6210<\/h3>\n<ul>\n<li>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u69cb\u6210\u3067\u30b9\u30bf\u30c3\u30af\u3092\u81ea\u52d5\u4f5c\u6210<\/li>\n<li>\u4e26\u5217\u3067\u30ea\u30bd\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u4f9d\u5b58\u95a2\u4fc2\u304c\u3042\u308b\u5834\u5408\u306f\u81ea\u52d5\u7684\u306b\u89e3\u6c7a\u3059\u308b\u3002<\/li>\n<\/ul>\n<h3>\u5909\u66f4<\/h3>\n<ul>\n<li>\u30b9\u30bf\u30c3\u30af\u306b\u524d\u56de\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3068\u306e\u5dee\u5206\u3092\u9069\u7528\u3059\u308b\u3002<\/li>\n<li>\u30ea\u30bd\u30fc\u30b9\u505c\u6b62\u6642\u306f\u7121\u505c\u6b62\u5909\u66f4\/\u518d\u8d77\u52d5\/\u518d\u4f5c\u6210\u306e\u3044\u305a\u308c\u304b\u304c\u767a\u751f<\/li>\n<li>Change Set\u3092\u4f5c\u308b\u4e8b\u3067\u5dee\u5206\u306e\u5185\u5bb9\u3092\u4e8b\u524d\u306b\u78ba\u8a8d\u53ef\u80fd<\/li>\n<\/ul>\n<h3>\u524a\u9664<\/h3>\n<ul>\n<li>\u4f9d\u5b58\u95a2\u4fc2\u306f\u89e3\u6c7a\u3057\u3064\u3064\u30ea\u30bd\u30fc\u30b9\u3092\u5168\u3066\u524a\u9664<\/li>\n<li>\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2\u306f\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u53d6\u5f97\/\u4fdd\u6301\u304c\u53ef\u80fd<\/li>\n<\/ul>\n<h2>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u6c7a\u307e\u3063\u305f\u5f62\u5f0f\uff08JSON\/YAML\u5f62\u5f0f\uff09<\/strong><\/span>\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\u53ef\u8996\u6027\u304c\u9ad8\u304f\u30b3\u30e1\u30f3\u30c8\u304c\u8a18\u8ff0\u3067\u304d\u308bYAML\u3067\u8a18\u8ff0\u3059\u308b\u3053\u3068\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u52d5\u304b\u3059\u305f\u3081\u306b\u306fS3\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u8a18\u8ff0\u5185\u5bb9<\/h3>\n<ul>\n<li>\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u5b9a\u7fa9<\/li>\n<li>\u30ea\u30bd\u30fc\u30b9\u306e\u4f5c\u6210<\/li>\n<li>\u5b9f\u969b\u306e\u8a2d\u5b9a<\/li>\n<li>\u30b3\u30b9\u30c8\u5224\u5225\u3057\u3084\u3059\u3044\u3002\uff08\u30b3\u30b9\u30c8\u8a08\u7b97\u30c4\u30fc\u30eb\u306b\u53cd\u6620\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\uff09<\/li>\n<li>\u30b9\u30bf\u30c3\u30af\u306e\u4f5c\u6210\u3084\u524a\u9664\u304c\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/li>\n<\/ul>\n<h3>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u8aa4\u308a\u304c\u3042\u3063\u305f\u5834\u5408<\/h3>\n<p>\u81ea\u52d5\u3067\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u5b89\u5fc3\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30bf\u30c3\u30af<\/h2>\n<p>CloudFormation\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089\u4f5c\u6210\u3055\u308c\u305fAWS\u30b5\u30fc\u30d3\u30b9\u306e\u96c6\u5408\u4f53\u306e\u3053\u3068\u3002<\/p>\n<h2>\u6d41\u308c<\/h2>\n<ol>\n<li>\u8a18\u8ff0<\/li>\n<li>\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/li>\n<li>\u30b9\u30bf\u30c3\u30af\u306e\u4f5c\u6210<\/li>\n<li>\u30ea\u30bd\u30fc\u30b9\u306e\u4f5c\u6210\u3068\u7ba1\u7406<\/li>\n<\/ol>\n<h2>\u66f8\u304d\u65b9<\/h2>\n<p>\u62e1\u5f35\u5b50\u306fyml\u3084yaml<\/p>\n<pre class=\"lang:default decode:true\">AWSTemplateFormatVersion: '2010-09-09'\r\nParameters:\r\n  VPCStack:\r\n    Type: String\r\n    Default: xxxxxx\r\n\r\nResources:\r\n  EC2Server01:\r\n    Type: AWS::EC2::Instance\r\n    Propeties:\r\n      ImageId: : !Ref  EC2AMI\r\n\r\nOutputs:\r\n  EC2Server01:  \r\n    Value: !Ref EC2xxxx\r\n    Export:\r\n      Name: !Sub \r\n\r\n<\/pre>\n<h2>\u4e3b\u8981\u9805\u76ee<\/h2>\n<h3>Parameters<\/h3>\n<p>\u30b9\u30bf\u30c3\u30af\u69cb\u7bc9\u6642\u306b\u30e6\u30fc\u30b6\u30fc\u306b\u6307\u5b9a\u3055\u305b\u308b\u5024\u3092\u6307\u5b9a<\/p>\n<h3>Resources<\/h3>\n<p><span style=\"color: #ff0000;\"><strong>\u5fc5\u9808\u9805\u76ee<\/strong><\/span>\u3001\u8d77\u52d5\u3059\u308b\u30bf\u30a4\u30d7\u3084\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h3>Outputs<\/h3>\n<p>\u30b9\u30bf\u30c3\u30af\u69cb\u7bc9\u5f8c\u306b\u8868\u793a\u30fb\u53d6\u5f97\u3057\u305f\u5024\u3084\u4ed6\u306e\u30b9\u30bf\u30c3\u30af\u3068\u306e\u9023\u643a\u306e\u305f\u3081\u306e\u51fa\u529b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"CloudFormation\u3068\u306f\uff1f EC2\u3084ELB\u3068\u3044\u3063\u305fAWS\u30b5\u30fc\u30d3\u30b9\u306e\u74b0\u5883\u69cb\u7bc9\u3092\u81ea\u52d5\u5316\u3067\u304d\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002 \u69cb\u7bc9\u5f8c\u3059\u3050\u306b\u30ea\u30bd\u30fc\u30b9\u304c\u7a3c\u50cd\u3057\u59cb\u3081\u307e\u3059\u3002\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u5909\u66f4\u3055\u308c\u305f\u304b\u5909\u66f4\u3055\u308c\u3066\u306a\u3044\u304b\u81ea\u52d5\u3067\u5224\u65ad\u3057\u307e\u3059\u3002\u4f5c\u6210\u3057\u305f\u30b9 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[80],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12569"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12569"}],"version-history":[{"count":12,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12569\/revisions"}],"predecessor-version":[{"id":20104,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12569\/revisions\/20104"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12569"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}