{"id":20495,"date":"2021-09-27T17:46:48","date_gmt":"2021-09-27T08:46:48","guid":{"rendered":"https:\/\/www.skyarch.net\/blog\/?p=20495"},"modified":"2021-09-27T17:46:48","modified_gmt":"2021-09-27T08:46:48","slug":"cloudformation-yaml-%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/cloudformation-yaml-%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6\/","title":{"rendered":"CloudFormation YAML \u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>CloudFormation \u3092 YAML \u3067\u66f8\u304f\u6642\u3001\u5f53\u7136\u306a\u304c\u3089 YAML \u306e\u4ed5\u69d8\u3082\u7406\u89e3\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3093\u3060\u306a\u3068\u611f\u3058\u305f\u304d\u3063\u304b\u3051\u7b49\u306b\u3064\u3044\u3066\u304a\u8a71\u3057\u307e\u3059\u3002<br \/>\n\u5f97\u305f\u7d50\u8ad6\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u3067\u3059\u3002<\/p>\n<ul>\n<li>CloudFormation \u3092 YAML \u3067\u66f8\u304f\u6642\u306f YAML \u306e\u4ed5\u69d8\u306b\u3082\u6ce8\u610f<\/li>\n<li>AWS\u30a2\u30ab\u30a6\u30f3\u30c8ID\u306f\u30af\u30a9\u30fc\u30c8\u3059\u308b\u306e\u304c\u7121\u96e3<\/li>\n<\/ul>\n<h1>\u767a\u751f\u3057\u305f\u4e8b\u8c61<\/h1>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067 CloudFormation \u30b9\u30bf\u30c3\u30af\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001\u30ea\u30bd\u30fc\u30b9\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre>Parameters:\n  ReceiverAccountId:\n    Type: String\n    Default: 012345678901\n\nResources:\n  Policy:\n    Type: AWS::IAM::ManagedPolicy\n    Properties:\n      PolicyDocument:\n        Version: \"2012-10-17\"\n        Statement:\n          - Effect: \"Allow\"\n            Action: 'events:PutEvents'\n            Resource: !Sub \"arn:aws:events:us-east-1:${ReceiverAccountId}:event-bus\/default\"\n<\/pre>\n<p>\u5bfe\u8c61\u30ea\u30bd\u30fc\u30b9(IAM Policy)\u4f5c\u6210\u6642\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<blockquote><p>\n  The policy failed legacy parsing (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; Proxy: null)\n<\/p><\/blockquote>\n<a href=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h32_27.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-20497\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h32_27-1024x475.png\" alt=\"\" width=\"728\" height=\"338\" srcset=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h32_27-1024x475.png 1024w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h32_27-300x139.png 300w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h32_27-768x356.png 768w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h32_27-728x338.png 728w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h32_27.png 1391w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/a>\n<p>\u3088\u304f\u898b\u308b\u3068\u30d1\u30e9\u30e1\u30fc\u30bf\u300cReceiverAccountId\u300d\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304c\u3001<code>012345678901 -&gt; 1.2345678901E10<\/code> \u3068\u3044\u3046\u3088\u3046\u306b\u6307\u6570\u8868\u793a\u306b\u5909\u63db\u3055\u308c\u3066\u3057\u307e\u3063\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<a href=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h36_01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20499\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h36_01.png\" alt=\"\" width=\"767\" height=\"341\" srcset=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h36_01.png 767w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h36_01-300x133.png 300w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2021\/09\/2021-09-21_17h36_01-728x324.png 728w\" sizes=\"auto, (max-width: 767px) 100vw, 767px\" \/><\/a>\n<h1>\u89e3\u6c7a\u3057\u305f\u65b9\u6cd5<\/h1>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b Default \u5024\u3092\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u3080\u3068\u672c\u6765\u306e\u300c012345678901\u300d\u3068\u306a\u308a\u3001\u30c7\u30d7\u30ed\u30a4\u304c\u6210\u529f\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre>Parameters:\n  ReceiverAccountId:\n    Type: String\n    Default: <span style=\"color: #ffff00\">'012345678901'\n<\/span><\/pre>\n<h1>\u6c17\u3065\u3044\u305f\u3053\u3068<\/h1>\n<p>\u4e0a\u8a18\u4e8b\u8c61\u306b\u3064\u3044\u3066\u3001\u5f53\u521d\u306f\u300c\u6570\u5024\u3060\u3051\u66f8\u304f\u3068\u304a\u304b\u3057\u304f\u306a\u308b\u304b\u3089\u30af\u30a9\u30fc\u30c8\u3059\u308c\u3070\u3044\u3044\u3093\u3060\u306a\u300d\u3068\u3057\u304b\u8003\u3048\u3066\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u672c\u8a18\u4e8b\u3092\u66f8\u304f\u306b\u3042\u305f\u308a\u3044\u304f\u3064\u304b\u691c\u8a3c\u3057\u305f\u3068\u3053\u308d\u6c17\u3065\u304f\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u4ee5\u4e0b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8(\u4e00\u90e8)\u306e\u5834\u5408\u306f\u8a72\u5f53\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u300c1\u300d\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u307e\u3041\u3001\u30bc\u30ed\u304c\u53d6\u308a\u9664\u304b\u308c\u3061\u3083\u3063\u305f\u306e\u304b\u306a\uff1f<\/p>\n<pre>Parameters:\n  ReceiverAccountId:\n    Type: String\n    Default: <span style=\"color: #ffff00\">000000000001\n<\/span><\/pre>\n<p>\u4ee5\u4e0b\u306e\u5834\u5408\u306f\u300c9\u300d\u3067\u3057\u305f\u3002<br \/>\n\uff1f\uff1f<\/p>\n<pre>Parameters:\n  ReceiverAccountId:\n    Type: String\n    Default: <span style=\"color: #ffff00\">000000000011\n<\/span><\/pre>\n<p>\u4ee5\u4e0b\u306e\u5834\u5408\u306f\u300c10\u300d\u3067\u3057\u305f\u3002<br \/>\n\u3053\u3053\u3067\u3088\u3046\u3084\u304f\u3001\u3069\u3046\u3084\u30898\u9032\u6570\u306b\u306a\u3063\u3066\u308b\u3089\u3057\u3044\u305e\u3068\u6c17\u3065\u304d\u307e\u3057\u305f\u3002<\/p>\n<pre>Parameters:\n  ReceiverAccountId:\n    Type: String\n    Default: <span style=\"color: #ffff00\">000000000012\n<\/span><\/pre>\n<p>\u66f4\u306b\u8abf\u3079\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u3082\u898b\u3064\u3051\u307e\u3057\u305f\u3002<br \/>\n\u3069\u3046\u3084\u3089 YAML \u306e\u89e3\u91c8\u30d7\u30ed\u30bb\u30b9\u306b\u3088\u3063\u3066\u5024\u304c\u5909\u63db\u3055\u308c\u3066\u3044\u305f\u3088\u3046\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/yaml.org\/spec\/1.1\/#id858600\" target=\"_blank\" rel=\"noopener\">YAML Version 1.1 - 2.4. Tags<\/a> \u203b1<\/p>\n<pre class=\"programlisting\"><span class=\"database\">Example 2.19. Integers\n\ncanonical: 12345\ndecimal: +12,345\nsexagesimal: 3:25:45\n<span style=\"color: #ffff00\">octal: 014<\/span>\nhexadecimal: 0xC<\/span><\/pre>\n<p>\u6700\u521d\u306e <code>012345678901 -&gt; 1.2345678901E10<\/code> \u3068\u3044\u3046\u5909\u63db\u306b\u3064\u3044\u3066\u306f\u30cf\u30c3\u30ad\u30ea\u3068\u3057\u305f\u7b54\u3048\u3092\u898b\u3064\u3051\u3089\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\n\u305f\u3060\u3001\u300c012345678901\u300d\u3068\u3044\u3046\u5024\u306b\u3064\u3044\u3066\u306f\u300c0\u304b\u3089\u59cb\u307e\u3063\u3066\u3044\u308b\u304c\u300d\u300c8\u4ee5\u4e0a\u306e\u6570\u304c\u542b\u307e\u308c\u3066\u3044\u308b\uff1d8\u9032\u6570\u3067\u306f\u306a\u3044\u300d\u3068\u3044\u3046\u70b9\u304c\u30dd\u30a4\u30f3\u30c8\u306a\u306e\u304b\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u203b1 CloudFormation \u306f YAML 1.1 \u306b\u5bfe\u5fdc<br \/>\n<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AWSCloudFormation\/latest\/UserGuide\/template-formats.html\" target=\"_blank\" rel=\"noopener\">AWS CloudFormation \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5f62\u5f0f<\/a><\/p>\n<blockquote><p>\n  AWS CloudFormation \u306f\u3001\u3044\u304f\u3064\u304b\u306e\u4f8b\u5916\u3092\u9664\u304d\u3001YAML \u30d0\u30fc\u30b8\u30e7\u30f3 1.1 \u306e\u4ed5\u69d8\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\n<\/p><\/blockquote>\n<h1>\u307e\u3068\u3081<\/h1>\n<p>\u518d\u63b2\u3067\u3059\u304c\u3001\u4e0b\u8a18\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>CloudFormation \u3092 YAML \u3067\u66f8\u304f\u6642\u306f YAML \u306e\u4ed5\u69d8\u306b\u3082\u6ce8\u610f<\/li>\n<li>AWS\u30a2\u30ab\u30a6\u30f3\u30c8ID\u306f\u30af\u30a9\u30fc\u30c8\u3059\u308b\u306e\u304c\u7121\u96e3<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CloudFormation \u3092 YAML \u3067\u66f8\u304f\u6642\u3001\u5f53\u7136\u306a\u304c\u3089 YAML \u306e\u4ed5\u69d8\u3082\u7406\u89e3\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3093\u3060\u306a\u3068\u611f\u3058\u305f\u304d\u3063\u304b\u3051\u7b49\u306b\u3064\u3044\u3066\u304a\u8a71\u3057\u307e\u3059\u3002 \u5f97\u305f\u7d50\u8ad6\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u3067\u3059\u3002 CloudFormation \u3092 YAML&#8230;<\/p>\n","protected":false},"author":60,"featured_media":19252,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"https:\/\/www.skyarch.net\/blog\/?p=20495","footnotes":""},"categories":[20,1079],"tags":[542],"class_list":{"0":"post-20495","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-aws","8":"category-cloudformation","9":"tag-aws-cloudformation","10":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/20495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/60"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=20495"}],"version-history":[{"count":15,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/20495\/revisions"}],"predecessor-version":[{"id":20709,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/20495\/revisions\/20709"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/19252"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=20495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=20495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=20495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}