{"id":9275,"date":"2022-02-21T15:37:40","date_gmt":"2022-02-21T06:37:40","guid":{"rendered":"https:\/\/www.ecomottblog.com\/?p=9275"},"modified":"2022-02-22T17:53:07","modified_gmt":"2022-02-22T08:53:07","slug":"aws-cloudformation-cfn-init-%e5%88%9d%e3%82%81%e3%81%ae%e4%b8%80%e6%ad%a9","status":"publish","type":"post","link":"https:\/\/test.ecomottblog.com\/?p=9275","title":{"rendered":"AWS CloudFormation cfn-init \u3092\u4f7f\u3063\u3066\u307f\u308b"},"content":{"rendered":"<p>&nbsp;<\/p>\n<div>\u3053\u3093\u306b\u3061\u306f\u3002<\/div>\n<div>\u958b\u767a\u90e8\u306e\u677e\u7530\u3067\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u6700\u8fd1\u3001\u691c\u8a3c\u74b0\u5883\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306bCloudFormation\u306ecfn-init\u3092\u4f7f\u7528\u3057\u3066\u69cb\u7bc9\u3057\u307e\u3057\u305f\u306e\u3067\u305d\u306e\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3044\u305f\u3057\u307e\u3059\u3002<\/div>\n<p><!--more--><\/p>\n<h1>CloudFormation\u3068\u306f\uff1f<\/h1>\n<div>CloudFormation\u3067\u306fVPC\u3084EC2\u306a\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u306e\u8a2d\u5b9a\u3092\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304f\u3053\u3068\u3067\u3001\u305d\u3053\u304b\u3089\u7c21\u5358\u306b\u30ea\u30bd\u30fc\u30b9\u306e\u4f5c\u6210\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<div>\u4eca\u56de\u306f\u3001CloudFormation\u3092\u4f7f\u3063\u305f\u3053\u3068\u306f\u3042\u308b\u3051\u3069\u3001cfn-init\u3092\u4f7f\u3063\u305f\u3053\u3068\u304c\u7121\u3044\u3068\u3044\u3046\u4eba\u3092\u5bfe\u8c61\u306b\u8aac\u660e\u3092\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u306e\u3067\u3001&nbsp;<\/div>\n<div>CloudFormation\u306b\u3064\u3044\u3066\u308f\u304b\u3089\u306a\u3044\u65b9\u306f\u4e00\u5ea6<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AWSCloudFormation\/latest\/UserGuide\/Welcome.html\">\u3053\u3061\u3089<\/a>\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\n<h1>cfn-init\u3068\u306f\uff1f<\/h1>\n<\/div>\n<div>CloudFormation\u306b\u306fEC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u308a\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30014\u7a2e\u985e\u306e\u30d8\u30eb\u30d1\u30fc\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5b58\u5728\u3057\u307e\u3059\u3002<\/div>\n<div>\u4eca\u56de\u7d39\u4ecb\u3059\u308bcfn-init\u306f\u305d\u306e\u3046\u3061\u306e\u4e00\u3064\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>CloudFormation\u30d8\u30eb\u30d1\u30fc\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u3064\u3044\u3066\u77e5\u308a\u305f\u3044\u65b9\u306f<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AWSCloudFormation\/latest\/UserGuide\/cfn-helper-scripts-reference.html\">\u3053\u3061\u3089<\/a><\/div>\n<div>&nbsp;<\/div>\n<div>cfn-init\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001CloudFormation\u3067\u4f5c\u6210\u3057\u305fEC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3084\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u59cb\u3057\u305f\u72b6\u614b\u3067\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<h1>cfn-init\u3092\u4f7f\u3063\u3066\u307f\u308b<\/h1>\n<div>\u3055\u3063\u305d\u304fcfn-init\u3092\u4f7f\u3063\u3066\u3001Apache\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u7c21\u5358\u306aHTML\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u3001Apache\u306e\u8d77\u52d5\u307e\u3067\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u4eca\u56de\u4f7f\u7528\u3059\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u3001EC2 1\u53f0\u3092\u4f5c\u6210\u3059\u308b\u70ba\u306e\u8a2d\u5b9a\u306e\u307f\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/div>\n<div>\u203bVPC\u3084Subnet\u306f\u4f5c\u6210\u6e08\u307f\u306e\u3082\u306e\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u307e\u305a\u306fcfn-init\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3068\u3001cfn-init\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u305d\u308c\u305e\u308c\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/div>\n<h2>cfn-init\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306e\u4f8b<\/h2>\n<pre class=\"lang:default decode:true\">AWSTemplateFormatVersion: \"2010-09-09\"\nDescription: cfn-init-test\n\n\nParameters:\n&nbsp; VpcId:\n&nbsp; &nbsp; Type: 'AWS::EC2::VPC::Id'\n&nbsp; &nbsp; Description: Your VPC Id\n&nbsp; SubnetId:\n&nbsp; &nbsp; Type: 'AWS::EC2::Subnet::Id'\n&nbsp; &nbsp; Description: SubnetId in your VPC\n&nbsp; KeyName:\n&nbsp; &nbsp; Type: 'AWS::EC2::KeyPair::KeyName'\n&nbsp; &nbsp; Description: Name of an existing EC2 KeyPair to enable SSH access to the instances\n&nbsp; &nbsp; Default: \"your key name\"\n&nbsp; FromIpAddress:\n&nbsp; &nbsp; Type: String\n&nbsp; &nbsp; Description: The IP address range that can be used to SSH and HTTP to the EC2 instances\n&nbsp; &nbsp; Default: 0.0.0.0\/0\n\n\nResources:\n# ------------------------------------------------------------#\n# &nbsp;EC2\n# ------------------------------------------------------------#\n&nbsp; EC2InstanceServer:\n&nbsp; &nbsp; &nbsp; Type: AWS::EC2::Instance\n&nbsp; &nbsp; &nbsp; Properties:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ImageId: your AMI ID #Amazon Linux 2 AMI (HVM) - Kernel 5.10, SSD Volume Type\u3092\u4f7f\u7528\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InstanceType: t3.micro\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BlockDeviceMappings:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - DeviceName: \/dev\/xvda\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ebs:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VolumeSize: 20\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VolumeType: gp2\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KeyName: !Ref KeyName\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NetworkInterfaces:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - AssociatePublicIpAddress: true\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SubnetId: !Ref SubnetId\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeviceIndex: \"0\"\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GroupSet:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - !Ref SecurityGroup\n\n&nbsp; SecurityGroup:\n&nbsp; &nbsp; &nbsp; Type: AWS::EC2::SecurityGroup\n&nbsp; &nbsp; &nbsp; Properties:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GroupDescription: Enable SSH, HTTP and zabbixagent\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SecurityGroupIngress:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - IpProtocol: tcp\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FromPort: 22\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToPort: 22\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CidrIp: !Ref FromIpAddress\n\n\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - IpProtocol: tcp\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FromPort: 80\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToPort: 80\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CidrIp: !Ref FromIpAddress\n\n\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - IpProtocol: tcp\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FromPort: 10051\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToPort: 10051\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CidrIp: !Ref FromIpAddress\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VpcId: !Ref VpcId<\/pre>\n<h2>cfn-init\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306e\u4f8b<\/h2>\n<div>\n<pre class=\"lang:yaml decode:true\">AWSTemplateFormatVersion: \"2010-09-09\"\nDescription: cfn-init-test\n\n\nParameters:\n&nbsp; VpcId:\n&nbsp; &nbsp; Type: 'AWS::EC2::VPC::Id'\n&nbsp; &nbsp; Description: Your VPC Id\n&nbsp; SubnetId:\n&nbsp; &nbsp; Type: 'AWS::EC2::Subnet::Id'\n&nbsp; &nbsp; Description: SubnetId in your VPC\n&nbsp; KeyName:\n&nbsp; &nbsp; Type: 'AWS::EC2::KeyPair::KeyName'\n&nbsp; &nbsp; Description: Name of an existing EC2 KeyPair to enable SSH access to the instances\n&nbsp; &nbsp; Default: \"your key name\"\n&nbsp; FromIpAddress:\n&nbsp; &nbsp; Type: String\n&nbsp; &nbsp; Description: The IP address range that can be used to SSH and HTTP to the EC2 instances\n&nbsp; &nbsp; Default: 0.0.0.0\/0\n\nResources:\n# ------------------------------------------------------------#\n# &nbsp;EC2\n# ------------------------------------------------------------#\n&nbsp; EC2InstanceServer:\n&nbsp; &nbsp; &nbsp; Type: AWS::EC2::Instance\n&nbsp; &nbsp; &nbsp; Metadata:\n&nbsp; &nbsp; &nbsp; &nbsp; Comment: ApacheInstall\n&nbsp; &nbsp; &nbsp; &nbsp; AWS::CloudFormation::Init:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; configSets:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Install:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - \"ApacheInstall\"\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ApacheInstall:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; packages:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yum:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; httpd: []\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; files:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/var\/www\/html\/index.html:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content: !Sub |\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Hello!&lt;\/p&gt;\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mode: '000644'\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; owner: root\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; group: root\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; services:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sysvinit:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; httpd:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enabled: true\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ensureRunning: true\n&nbsp; &nbsp; &nbsp; Properties:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ImageId: your AMI ID #Amazon Linux 2 AMI (HVM) - Kernel 5.10, SSD Volume Type\u3092\u4f7f\u7528\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InstanceType: t3.micro\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BlockDeviceMappings:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - DeviceName: \/dev\/xvda\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ebs:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VolumeSize: 20\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VolumeType: gp2\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KeyName: !Ref KeyName\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NetworkInterfaces:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - AssociatePublicIpAddress: true\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SubnetId: !Ref SubnetId\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeviceIndex: \"0\"\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GroupSet:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - !Ref SecurityGroup\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UserData:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Fn::Base64: !Sub |\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #!\/bin\/bash -x\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yum -y update\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yum -y install aws-cfn-bootstrap\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Install the files and packages from the metadata\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # https:\/\/docs.aws.amazon.com\/ja_jp\/AWSCloudFormation\/latest\/UserGuide\/cfn-init.html\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/opt\/aws\/bin\/cfn-init -v --stack ${AWS::StackName} --resource EC2InstanceServer --region ${AWS::Region}\n\n&nbsp; SecurityGroup:\n&nbsp; &nbsp; &nbsp; Type: AWS::EC2::SecurityGroup\n&nbsp; &nbsp; &nbsp; Properties:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GroupDescription: Enable SSH, HTTP and zabbixagent\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SecurityGroupIngress:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - IpProtocol: tcp\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FromPort: 22\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToPort: 22\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CidrIp: !Ref FromIpAddress\n\n\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - IpProtocol: tcp\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FromPort: 80\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToPort: 80\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CidrIp: !Ref FromIpAddress\n\n\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - IpProtocol: tcp\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FromPort: 10051\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToPort: 10051\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CidrIp: !Ref FromIpAddress\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VpcId: !Ref VpcId\n<\/pre>\n<\/div>\n<div>&nbsp;<\/div>\n<div>2\u3064\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u9055\u3044\u3092\u7c21\u5358\u306b\u307e\u3068\u3081\u308b\u3068\u3001&nbsp;Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u3068Userdata\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u6709\u7121\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<div>\u9055\u3044\u304c\u5206\u304b\u3063\u305f\u3068\u3053\u308d\u3067\u3001\u3053\u3053\u304b\u3089\u306f\u4f7f\u3044\u65b9\u3092\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\n<h2>\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n<\/div>\n<div>cfn-init\u3092\u4f7f\u3046\u969b\u306b\u66f8\u304d\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308b\u7b87\u6240\u306f\u4e3b\u306b\u4e8c\u3064\u3067\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<ul>\n<li>Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u5b9f\u884c\u3057\u305f\u3044\u30b3\u30de\u30f3\u30c9\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/li>\n<li>Userdata\u30bb\u30af\u30b7\u30e7\u30f3\u3067Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u8a18\u8ff0\u3057\u305f\u5185\u5bb9\u3092\u6307\u5b9a\u3059\u308b\u3002<\/li>\n<\/ul>\n<div>\u6b21\u306f\u3001Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u3068Userdata\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u66f8\u304d\u65b9\u306b\u3064\u3044\u3066\u9806\u756a\u306b\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<h2>Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u66f8\u304d\u65b9<\/h2>\n<div>\u307e\u305a\u3001Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u66f8\u304d\u65b9\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/div>\n<div>cfn-init\u3092\u4f7f\u7528\u3057\u3066\u5b9f\u884c\u3057\u305f\u3044\u30b3\u30de\u30f3\u30c9\u306f\u3001\u3053\u306eMetadata\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u66f8\u304d\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u30b5\u30f3\u30d7\u30eb\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u3060\u3051\u3092\u629c\u304d\u51fa\u3057\u305f\u3082\u306e\u304c\u3053\u3061\u3089\u3067\u3059\u3002<\/div>\n<div>\n<pre class=\"lang:default decode:true\">&nbsp; &nbsp; &nbsp; Metadata:\n&nbsp; &nbsp; &nbsp; &nbsp; Comment: ApacheInstall\n&nbsp; &nbsp; &nbsp; &nbsp; AWS::CloudFormation::Init:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; config:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; packages:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yum:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; httpd: []\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; files:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/var\/www\/html\/index.html:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content: !Sub |\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;Hello!&lt;\/p&gt;\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mode: '000644'\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; owner: root\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; group: root\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; services:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sysvinit:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; httpd:\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enabled: true\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ensureRunning: true<\/pre>\n<\/div>\n<div>\u305d\u308c\u305e\u308c\u306e\u9805\u76ee\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<h3>2\u884c\u76ee Comment<\/h3>\n<p>\u3053\u3053\u306f\u30b3\u30e1\u30f3\u30c8\u306a\u306e\u3067\u7121\u304f\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u304c\u3001\u4f55\u3092\u5b9f\u884c\u3059\u308b\u306e\u304b\u7c21\u5358\u306b\u66f8\u3044\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002\u4eca\u56de\u306fApacheInstall\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>3\u884c\u76ee AWS::CloudFormation::Init<\/h3>\n<div>\u3053\u308c\u306f\u30e1\u30bf\u30c7\u30fc\u30bf\u30ad\u30fc\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u3067\u3059\u3002 cfn-init \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u547c\u3073\u51fa\u3059\u3068\u3001\u3053\u306eAWS::CloudFormation::Init\u5185\u306b\u66f8\u304b\u308c\u305f\u5185\u5bb9\u3092\u898b\u306b\u6765\u307e\u3059\u3002<\/div>\n<h3>4\u884c\u76eeconfig<\/h3>\n<div>\u3053\u308c\u306f\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u8ad6\u7406ID\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<div>configset\u3092\u4f7f\u7528\u3057\u306a\u3044\u5834\u5408\u3001cfn-init\u306f\u3053\u306econfig\u3068\u3044\u3046\u8ad6\u7406ID\u3092\u63a2\u3057\u3066\u3001\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/div>\n<div>\u4eca\u56de\u306fconfigset\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u306e\u3067config\u3068\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002<\/div>\n<h3>5\u884c\u76ee\u4ee5\u964d \u8a2d\u5b9a\u30bb\u30af\u30b7\u30e7\u30f3<\/h3>\n<div>5\u884c\u76ee\u4ee5\u964d\u306f\u3001\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306b\u3064\u3044\u3066\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u8a2d\u5b9a\u30bb\u30af\u30b7\u30e7\u30f3\u306f7\u7a2e\u985e\u3042\u308a\u3001packages, groups, users, sources, files, commands, services\u306e7\u3064\u3092\u4f7f\u3044\u5206\u3051\u3066\u66f8\u3044\u3066\u3044\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<div>\u307e\u305f\u3001\u5404\u30bb\u30af\u30b7\u30e7\u30f3\u306eMetadata\u5185\u3067\u306e\u8a18\u8ff0\u9806\u756a\u306b\u304b\u304b\u308f\u3089\u305a\u3001packages, groups, users, sources, files, commands, services\u306e\u9806\u756a\u3067\u5b9f\u884c\u3055\u308c\u3066\u884c\u304f\u306e\u3067\u3001\u305d\u306e\u70b9\u306b\u6ce8\u610f\u3057\u3066\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u4e0a\u8a18\u306e\u9806\u756a\u3067\u306f\u5b9f\u884c\u3057\u305f\u3044\u5185\u5bb9\u3092\u5b9f\u73fe\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u306fconfigset\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u81ea\u7531\u306a\u9806\u756a\u3067\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/div>\n<div>\u9577\u304f\u306a\u308b\u306e\u3067\u672c\u8a18\u4e8b\u3067\u306f\u8aac\u660e\u3092\u7701\u304d\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u4eca\u56de\u306f\u3001packages,files,services\u3068\u3044\u30463\u3064\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u3001\u5b9f\u884c\u3057\u305f\u3044\u30b3\u30de\u30f3\u30c9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u4eca\u56de\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u30bb\u30af\u30b7\u30e7\u30f3\u3082\u542b\u3081\u305f\u5404\u8a2d\u5b9a\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u3084configset\u306b\u3064\u3044\u3066\u306f\u3001\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<div>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AWSCloudFormation\/latest\/UserGuide\/aws-resource-init.html#aws-resource-init-services\">AWS::CloudFormation::Init AWS CloudFormation \u30e6\u30fc\u30b6\u30fc\u30ac\u30a4\u30c9<\/a><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p>\u3053\u3053\u304b\u3089\u306fpackages,files,services\u3068\u3044\u30463\u3064\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4>packages\u30bb\u30af\u30b7\u30e7\u30f3<\/h4>\n<div>packages\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u5f62\u5f0f\u3084\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u6307\u5b9a\u3001\u5404\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u6307\u5b9a\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/div>\n<div>packages\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u5f62\u5f0f\u306fapt\u3001msi\u3001python\u3001rpm\u3001rubygems\u3001yum\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<p>&nbsp;<\/p>\n<div>\u4eca\u56de\u306fyum \u3092\u4f7f\u3063\u3066Apache\u306e\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u3044\u3066\u3044\u307e\u3059\u3002\u7a7a\u306e\u30ea\u30b9\u30c8\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/div>\n<div>\n<pre class=\"lang:default decode:true\">yum:\n&nbsp; httpd: []<\/pre>\n<\/div>\n<h4>files\u30bb\u30af\u30b7\u30e7\u30f3<\/h4>\n<div>files\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u30bb\u30af\u30b7\u30e7\u30f3\u5185\u3067\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3082\u3001URL\u304b\u3089\u53d6\u5f97\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/div>\n<div>\u3053\u3053\u3067\u306f\u3001Web\u30a2\u30af\u30bb\u30b9\u3057\u305f\u6642\u306bHello!\u3068\u8868\u793a\u3059\u308b\/var\/www\/html\/index.html\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/div>\n<div>\n<pre class=\"lang:default decode:true\">files:\n  \/var\/www\/html\/index.html:\n   content: !Sub |\n    &lt;p&gt;Hello!&lt;\/p&gt;\n   mode: '000644'\n   owner: root\n   group: root<\/pre>\n<\/div>\n<h4>services\u30bb\u30af\u30b7\u30e7\u30f3<\/h4>\n<div>services\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u8d77\u52d5\u3055\u308c\u308b\u3068\u304d\u306b\u30b5\u30fc\u30d3\u30b9\u3092\u8d77\u52d5\u3059\u308b\u304b\u505c\u6b62\u72b6\u614b\u306b\u3059\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/div>\n<div>\u4eca\u56de\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u305f\u77ac\u9593\u304b\u3089Web\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046Apache\u306e\u8d77\u52d5\u3001\u81ea\u52d5\u8d77\u52d5\u3092\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/div>\n<div>enabled\u304c\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\u3001ensureRunning\u304c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8d77\u52d5\u76f4\u5f8c\u306e\u8d77\u52d5\u8a2d\u5b9a\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<div>\n<pre class=\"lang:default decode:true\">services:\n  sysvinit:\n   httpd:\n    enabled: true\n    ensureRunning: true<\/pre>\n<\/div>\n<div>\u3053\u308c\u3067\u3001Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u304c\u7d42\u308f\u308a\u307e\u3057\u305f\u3002<\/div>\n<div>\u5b8c\u6210\u307e\u3067\u3042\u3068\u5c11\u3057\u3067\u3059\uff01\uff01<\/div>\n<div>&nbsp;<\/div>\n<h2>Userdata\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u66f8\u304d\u65b9<\/h2>\n<div>Userdata\u30bb\u30af\u30b7\u30e7\u30f3\u306f\u3001EC2\u8d77\u52d5\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u3053\u306bcfn-init \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001Metadata\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u66f8\u3044\u305f\u5185\u5bb9\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\n<pre class=\"lang:default decode:true\">UserData:\n&nbsp; Fn::Base64: !Sub |\n   #!\/bin\/bash -x\n   yum -y update\n   yum -y install aws-cfn-bootstrap\n   # Install the files and packages from the metadata\n   # https:\/\/docs.aws.amazon.com\/ja_jp\/AWSCloudFormation\/latest\/UserGuide\/cfn-init.html\n   \/opt\/aws\/bin\/cfn-init -v --stack ${AWS::StackName} --resource EC2InstanceServer --region ${AWS::Region}<\/pre>\n<\/div>\n<div>&nbsp;<\/div>\n<div>cfn-init \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u90e8\u5206\u3092\u629c\u7c8b\u3057\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/div>\n<div>\n<pre class=\"lang:default decode:true\">\/opt\/aws\/bin\/cfn-init -v --stack ${AWS::StackName} --resource EC2InstanceServer --region ${AWS::Region}<\/pre>\n<\/div>\n<div>&nbsp;<\/div>\n<div>&#8211;stack,&#8211;region\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u306f\u305d\u308c\u305e\u308c\u30b7\u30a7\u30eb\u5909\u6570\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/div>\n<div>&#8211;resource\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u306f\u3001\u4eca\u56de\u4f5c\u6210\u3059\u308bEC2\u306e\u8ad6\u7406ID\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u5404\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/AWSCloudFormation\/latest\/UserGuide\/cfn-init.html\">AWS CloudFormation cfn-init<\/a>\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u3053\u308c\u3067\u3001Userdata\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u304c\u7d42\u308f\u308a\u307e\u3057\u305f\u3002<\/div>\n<div>\u5b8c\u6210\u3067\u3059\uff01<\/div>\n<h1>\u8d77\u52d5\u3057\u3066\u307f\u308b<\/h1>\n<div>\u4f5c\u6210\u3057\u305f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3063\u3066EC2\u3092\u8d77\u52d5\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/div>\n<div>EC2\u304c\u8d77\u52d5\u3057\u305f\u3089\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30d1\u30d6\u30ea\u30c3\u30afIP\u30a2\u30c9\u30ec\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3059\u3002<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-9294\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2022\/02\/image-300x196.png\" alt=\"\" width=\"300\" height=\"196\" srcset=\"https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2022\/02\/image-300x196.png 300w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2022\/02\/image-304x198.png 304w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2022\/02\/image-282x184.png 282w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2022\/02\/image.png 647w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<div>Hello\uff01\u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/div>\n<p>&nbsp;<\/p>\n<h1>\u307e\u3068\u3081<\/h1>\n<div>\u4eca\u56de\u306fcfn-init\u3092\u4f7f\u7528\u3057\u3066\u3001Apache\u304c\u8d77\u52d5\u3057\u305f\u72b6\u614b\u306eEC2\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u500b\u4eba\u7684\u306b\u611f\u3058\u305f\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u306f\u3001 UserData\u30bb\u30af\u30b7\u30e7\u30f3\u5185\u306b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u5168\u3066\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u304f\u3088\u308a\u3082\u53ef\u8aad\u6027\u304c\u9ad8\u3044\u3053\u3068\u3001\u4fee\u6b63\u3084\u5909\u66f4\u304c\u5bb9\u6613\u3067\u3042\u308b\u3053\u3068\u304c\u6319\u3052\u3089\u308c\u307e\u3059\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>CloudFormation\u3067EC2\u3092\u4f5c\u6210\u3057\u305f\u3053\u3068\u306f\u3042\u308b\u3051\u3069\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u624b\u52d5\u3067\u3084\u3063\u3066\u3044\u305f\u3068\u3044\u3046\u65b9\u306f\u3001\u3053\u306e\u6a5f\u4f1a\u306bcfn-init\u3092\u4f7f\u3063\u3066\u307f\u307e\u305b\u3093\u304b\uff1f<\/div>\n<div>&nbsp;<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u3053\u3093\u306b\u3061\u306f\u3002 \u958b\u767a\u90e8\u306e\u677e\u7530\u3067\u3059\u3002 &nbsp; \u6700\u8fd1\u3001\u691c\u8a3c\u74b0\u5883\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306bCloudFormation\u306ecfn-init\u3092\u4f7f\u7528\u3057\u3066\u69cb\u7bc9\u3057\u307e\u3057\u305f\u306e\u3067\u305d\u306e\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":100,"featured_media":9285,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[24,31],"_links":{"self":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/9275"}],"collection":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/users\/100"}],"replies":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9275"}],"version-history":[{"count":12,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/9275\/revisions"}],"predecessor-version":[{"id":9277,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/9275\/revisions\/9277"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/media\/9285"}],"wp:attachment":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}