I know I can get new IP address by going to Elastic IPs --> Allocate new address but by doing this I always get IPs in different subnet range.
I want to IPs with sam
I Found a solution for my problem:
While creating new instance itself we can assign IP address within the same subnet range.
Here are the steps : First have this ready
Then, * Launch Instance --> Choose the AMI --> choose instance type --> configure instance
Under configure instance :
*Select the network and subnet you have just created
Then in same Page , downside you see Network interfaces : Here , Add Primary Ip , secondary Ip (you can add as many based on your subscription)
But for a free tier max 2 you can add !!
But main thing is you can assign any IP you need from that subnet range you had created.
Hoping this will help someone.
Based on the documentation it isn't possible to select the IP from an address range for Elastic IP's unless you own the IP address space.
You can allocate an Elastic IP address from Amazon's pool of public IPv4 addresses, or from a custom IP address pool that you have brought to your AWS account. For more information about bringing your own IP address range to your AWS account, see Bring Your Own IP Addresses (BYOIP).
You may be able to hack around this but I don't think AWS would look kindly upon it.