Last active
April 1, 2017 07:46
-
-
Save abhinavkorpal/c650adb50b15431627511a2d0fd4a33f to your computer and use it in GitHub Desktop.
Create AWS ELB, Launch Config, and Auto Scaling Group
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
| aws elb create-load-balancer \ | |
| --load-balancer-name MyELB \ | |
| --listeners Protocol=TCP,LoadBalancerPort=80,InstanceProtocol=TCP,InstancePort=80 \ | |
| --subnets subnet-46e6506c subnet-57b8010f \ | |
| --scheme internet-facing \ | |
| --security-groups sg-aec570d4 | |
| aws autoscaling create-launch-configuration \ | |
| --launch-configuration-name MyLC \ | |
| --key-name virginia \ | |
| --image-id ami-6869aa05 \ | |
| --instance-type t2.micro \ | |
| --iam-instance-profile EC2Role \ | |
| --user-data file://myuserdata.txt | |
| aws autoscaling create-auto-scaling-group --auto-scaling-group-name MyASG \ | |
| --launch-configuration-name MyLC \ | |
| --min-size 1 \ | |
| --max-size 2 \ | |
| --load-balancer-names MyELB \ | |
| --health-check-type ELB \ | |
| --health-check-grace-period 120 \ | |
| --vpc-zone-identifier subnet-46e6506c,subnet-57b8010f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment