Created
May 16, 2019 15:16
-
-
Save mandeepbal/6ebf0d8be94d4512577a523d13ee8aa4 to your computer and use it in GitHub Desktop.
Cloudformation Launch Config - send user-data to aws system log
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
Resources: | |
LaunchConfig: | |
Type: AWS::AutoScaling::LaunchConfiguration | |
Properties: | |
IamInstanceProfile: !FindInMap [ EnvironmentMap, !Ref ParamEnvironment, InstanceProfile ] | |
ImageId: !Ref ParamInstanceAMI | |
InstanceType: !FindInMap [ EnvironmentMap, !Ref ParamEnvironment, InstanceType ] | |
SecurityGroups: !FindInMap [EnvironmentMap, !Ref ParamEnvironment, SecurityGroups] | |
UserData: | |
Fn::Base64: !Sub | |
- | | |
#!/bin/bash -x | |
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
echo "Test " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment