Thursday, 14 March 2019

Assign a custom primary private IP address to EC2 Server by Raj Gupta


It's not possible to assign a new custom primary private IP address to an existing instance.We can associate a custom IP address to your EC2 instance while the instance is being configured prior to launch.





  • Configure an EC2 instance.
  • In the Configure Instance Details section, for Network select a VPC or create a new VPC(I am taking default VPC). 
  • For Subnet, select the subnet or create a new subnet where you want to launch your instance(I am taking subnet(subnet-5150d036 whose IP range are 172.31.0.0/20).



  • In the Network interfaces section, type the custom private IPv4 address let say 172.31.2.5 (In the CIDR range of the chosen subnet)
  • Finish configuring and launch the instance.
  • Then after EC2 created you are able to see custom primary private IP address(172.31.2.5) in place of default ip address assign by aws.

No comments:

Post a Comment