-
-
Save nissshh/7488012847505ad9a4b6de299f2ca5df to your computer and use it in GitHub Desktop.
AWS CloudFormation UserData Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This example is from https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html. | |
UserData: | |
Fn::Base64: | |
!Sub | | |
#!/bin/bash -xe | |
yum update -y aws-cfn-bootstrap | |
/opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource LaunchConfig --configsets wordpress_install --region ${AWS::Region} | |
/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource WebServerGroup --region ${AWS::Region} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment