How to override AssociatePublicIpAddress for an EC2 instance
问题 We have several EC2 instances that are in a private subnet, but gets a public IP address every time that instance is launched. That private subnet has "Auto-assign Public IP" property set to No, but what happens is when instance was created, it got AssociatePublicIpAddress property set to true. Now we don't know how to reset AssociatePublicIpAddress to false without terminating the instances. I'd expect aws ec2 create-network-interface would have an option for that, but it's not the case. EC2