- Newest
- Most votes
- Most comments
Hello.
I hope the answers below will be helpful.
https://repost.aws/questions/QUVmpO9BWGSuGwQh5tXk3f5w/how-to-remove-ipv4-public-ip-address-from-ec2-instances-before-february-2024-ipv6#ANIgCHiXgQSdSiHc1wgH-6fA
- Create an ENI and attach it to the instance.
- Allocate an Elastic IP address using the below doc[1]
- Associate the Elastic IP to the primary ENI that has the public IP of the instance[2].
- Refresh the browser page and observe the instance public IP has changed to the new Elastic IP address.
- Disassociate the Elastic IP address from the primary ENI by following the below doc[3]
- Refresh the browser page again, and observe the instance public IP has been removed.
- Release the Elastic IP[4] and detach the ENI attached by the step #1.
References:
[1] Elastic IP addresses - Allocate an Elastic IP address - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-allocating
[2] Elastic IP addresses - Associate an Elastic IP address with an instance or network interface - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-associating
[3] Elastic IP addresses - Disassociate an Elastic IP address - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-associating-different
[4] Elastic IP addresses - Release an Elastic IP address - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-releasing
Relevant content
- asked a month ago
- asked 4 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago