Last active
March 5, 2020 12:12
-
-
Save AndrewBestbier/ab04ba622e22baa64a4cfcddac6e5b80 to your computer and use it in GitHub Desktop.
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
| AppLaunchConfig: # (1) | |
| Type: AWS::AutoScaling::LaunchConfiguration # (2) | |
| Properties: | |
| ImageId: ami-0389b2a3c4948b1a0 | |
| InstanceType: t2.micro | |
| SecurityGroups: | |
| - !Ref InstanceSecurityGroup | |
| AssociatePublicIpAddress: true | |
| UserData: | |
| Fn::Base64: | |
| Fn::Sub: | | |
| #!/bin/bash -xe | |
| yum update -y | |
| yum install -y httpd | |
| systemctl start httpd | |
| systemctl enable httpd | |
| echo "Hello from $(hostname -f)" > /var/www/html/index.html | |
| AutoScalingGroup: # (3) | |
| Type: AWS::AutoScaling::AutoScalingGroup # (4) | |
| Properties: | |
| LaunchConfigurationName: !Ref AppLaunchConfig # (5) | |
| AvailabilityZones: # (6) | |
| - !Select [0, !GetAZs ] | |
| - !Select [1, !GetAZs ] | |
| DesiredCapacity: 3 # (7) | |
| MinSize: 3 | |
| MaxSize: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment