How do I associate a static public IP address with my EC2 Windows or Linux instance or network interface?
2 minute read
0
The auto-assigned public IP address associated with my Amazon Elastic Compute Cloud (Amazon EC2) instance changes every time I stop and start the instance. I want to associate a static public IP address with my Amazon EC2 instance.
Short description
An Elastic IP address is a static public IPv4 address that's associated with your AWS account in a specific AWS Region. Unlike an auto-assigned public IP address, an Elastic IP address is preserved after you stop and start your instance in a virtual private cloud (VPC).
Note: You can't use an auto-assigned public IP address to retain or reserve the current public IP address that's assigned to the instance. You also can't convert an auto-assigned public IP address to an Elastic IP address.
To associate an Elastic IP address with your EC2 instance, use one of the following options:
The Amazon EC2 console
The AWS Command Line Interface (AWS CLI)
AWS Tools for PowerShell
Note: The default quota for Elastic IP addresses is five per Region per account. For more information, see Elastic IP address quota.