

Assigning multiple IP addresses to an EC 2 instanceĪssigning multiple IP addresses to an EC 2 instance involves passing User data to your instance: either cloud-init configuration details or a shell script for execution. Next, you must also put that network interface in that subnet.Īfter assigning a private IP address to your instance, you need to configure the operating system to recognize it (except for the primary IP on the primary interface). If you want to use IPv6 addresses on a network interface in EC2, you must associate an IPv6 CIDR block to a subnet.

In addition, it can have multiple IPv6 addresses (all of those must belong to one subnet as well). By extension, it also applies to all of the associated IPs for as long as they remain associated with it.Įvery network interface on EC2 can have two private IPv4 addresses (from that network interface’s subnet). A security group applies to the network interface. Every network interface has the ability to expose public IPs (a subclass of which are Elastic IPs or EIPs) to the world outside and private IPs to the system running your instance. Network interfaces in EC2 are detachable, so you can easily swap them and their associated IPs between running EC2 instances. If you assign any network interfaces in addition to eth0, AWS will disable the auto-assign public IP address feature. A brief introduction to EC2 networkingĮvery instance on EC2 can have up to 15 network interfaces ( depending on instance type) with one or more IPs each. Multiple IP addresses are a requirement for multiple SSL certificates and have a variety of other useful applications. Here is a brief summary that will get you started on using the most recent AWS capabilities. You can assign multiple IP addresses to an EC 2 instance.
