Forked from mikepfeiffer/gist:6f9e6cac7607fc365874cd7d31dbb141
Created
January 2, 2017 23:12
-
-
Save gsmurali/1f4d3cf116836943d0aede48aee54a68 to your computer and use it in GitHub Desktop.
Example to Create AWS ELB, Launch Config, and Auto Scaling Group
This file contains 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