Created
March 5, 2020 11:17
-
-
Save AndrewBestbier/1c645496faaedcebf6e85e1d4e245ac6 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: # (2) | |
Type: AWS::AutoScaling::LaunchConfiguration # (2) | |
Properties: | |
ImageId: ami-0389b2a3c4948b1a0 | |
InstanceType: t2.micro | |
SecurityGroups: | |
- !Ref InstanceSecurityGroup | |
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 # (3) | |
Properties: | |
LaunchConfigurationName: !Ref AppLaunchConfig # (3) | |
AvailabilityZones: # (3) | |
- !Select [0, !GetAZs ] | |
- !Select [1, !GetAZs ] | |
DesiredCapacity: 3 # (3) | |
MinSize: 3 | |
MaxSize: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment