After adding an additional network interface in AWS, I lost primary IP in AWS, when I hit “Attach”. It released the public IP. I don’t want this to happen.
Please do following
1 - Create a new Network Interface in the same subnet as your EC2 instance.
2 - Allocate a new Elastic IP for your VPC (if you haven’t done so already).
3 - Associate the Elastic IP address with your new Network Interface (eni).
4 - Attach your new Network Interface to your EC2 instance.