From 41e9634d7e840b262cdf4006431d1ab44055a485 Mon Sep 17 00:00:00 2001 From: adabalar1 Date: Sun, 24 Sep 2017 22:35:26 -0500 Subject: [PATCH] updated the cloudformation1 template --- .../part1/blog_template_part1.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Bluegreen-AMI-Application-Deployment-blog/part1/blog_template_part1.json b/Bluegreen-AMI-Application-Deployment-blog/part1/blog_template_part1.json index 08a62a6..6c0d25a 100644 --- a/Bluegreen-AMI-Application-Deployment-blog/part1/blog_template_part1.json +++ b/Bluegreen-AMI-Application-Deployment-blog/part1/blog_template_part1.json @@ -248,6 +248,12 @@ }, "LaunchConfig" : { "Type" : "AWS::AutoScaling::LaunchConfiguration", + "Metadata" : { + "AWS::CloudFormation::Init" : { + "config" : { + } + } + }, "DependsOn":["InstanceRoleInstanceProfile"], "Properties" : { "IamInstanceProfile" : { "Ref" : "InstanceRoleInstanceProfile" }, @@ -321,9 +327,7 @@ { "Fn::Join" : [ "", [ "", "" ] ] }, { "Fn::Join" : [ "", [ "yum install -y aws-cfn-bootstrap", "" ] ] }, { "Fn::Join" : [ "", [ "# Install the files and packages from the metadata", "" ] ] }, - { "Fn::Join" : [ "", [ "/opt/aws/bin/cfn-init -v --stack ", { "Ref" : "AWS::StackId" }, " --resource WebServerGroup --region \"$REGION\"", "" ] ] }, - { "Fn::Join" : [ "", [ "# Start up the cfn-hup daemon to listen for changes to the Web Server metadata", "" ] ] }, - { "Fn::Join" : [ "", [ "/opt/aws/bin/cfn-hup || error_exit 'Failed to start cfn-hup'", "" ] ] }, + { "Fn::Join" : [ "", [ "/opt/aws/bin/cfn-init -v --stack ", { "Ref" : "AWS::StackId" }, " --resource LaunchConfig --region \"$REGION\"", "" ] ] }, { "Fn::Join" : [ "", [ "# Signal the status from cfn-init", "" ] ] }, { "Fn::Join" : [ "", [ "/opt/aws/bin/cfn-signal -e $? --stack ", { "Ref" : "AWS::StackId" } ," --resource WebServerGroup --region \"$REGION\"", "" ] ] } ] ] } }