I am a begineer to aws elb. Can someone help me to understand how elb automatically creates a new instance depending on the traffic or cpu usage. Also when it creates a new instnces how does it copies code from existing instance? Any link/article will also be appreciated. Thanks in adavnce.
Asked
Active
Viewed 23 times
1 Answers
1
How elb automatically creates a new instance depending on the traffic or cpu usage?
ELB does not create the new instance the new instance is created by Launch configuration and Autoscaling group rules that you have set. https://docs.aws.amazon.com/autoscaling/latest/userguide/GettingStartedTutorial.html
Also when it creates a new instnces how does it copies code from existing instance?
When a new instance gets created from the AMI you have to add the replication mechanism either using user data scripts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) or running a cron job on that instance that will copy the files to that instance from a S3 bucket.

Piyush Patil
- 14,512
- 6
- 35
- 54
-
There's no requirement for storing your files on an S3 bucket. In fact you probably want to store your source code in a Git repository and have your script pull the code from there, not S3. – Mark B Sep 21 '16 at 14:59
-
Yes so I mentioned User data script already and I did not say storing on S3 is mandatory. – Piyush Patil Sep 21 '16 at 15:00
-
The wording in your last sentence makes it sound like S3 would be the only possible place you could copy files from. I didn't want someone very new to AWS (like the OP) to be confused by that. A better wording would be something like: "... from an S3 bucket or a Git repository or other location." – Mark B Sep 21 '16 at 16:38