w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Automatically assign Elastic IP from a pool of IPs to auto scalling instance

If your gateway is deployed in the same Amazon account as your servers, you might want to look at a VPC solution where you can control the instances' private IPs using masks.

If that is not an option, you will need to write a script, which you should add to the Launch Configuration's User Data.

In this script you can use AWS CLI to find which IP Addresses are available using describe-addresses, and use one of them to associate to your newly created instance using associate-address.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.