In the EC2 panel I can attach EC2 Linux machines by instance id or by IP address. I want sometimes to provision new EC2s manually, and I want them included in Load Balancer. I don't like load balancer configuration because instance names are confusing. Is there a way to create an elastic IP or a network card which will I be attaching to a new instance and this network card or elastic IP will be registered in load balancer and used to route traffic to multi-instances? I know that elastic IP is alone and LB won't be able to choose how to balance, but I hope you can understand what I mean here - I'm trying to simplify set-up, maybe you can suggest a solution.

1 Answer 1


You shouldn't use elastic IPs on this kind of instances as you'll run out rather quickly. Remember there's a (soft) limit of 5 per region.

About adding the instance to your load balancer, what you can do is register them into the target group upon launch. Adding something like aws elbv2 register-targets --target-group-arn YOUR_TG_ARN --targets "[ { 'Id': 'THIS_INSTACES_ID' } ]" into your User Data after you obtain the instance's id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.