-->

Sunday, April 5, 2015

Attaching a Network Interface from one Ec2 instance to another in AWS

It is possible to detach a Network Instance from one Ec2 instance and attach it to another Ec2 instance. This provides you flexibility to scale up the instance or you may even assign multiple ips to an instance and later update those to more machines in future. Depending on your needs you can leverage the advantage of this in your infrastructure.

For our consideration , we launched an Ec2 instance in a vpc without any Public IP Address. So we are going to detach the Network Interface and attach it to this Instance. This would inturn assign the elastic ip address to this new instance.



We created a network interface in our previous post here. We are going to detach that network interface and assign that one to our new instance. Follow the steps below to achieve this

1. Following are the details of the new Ec2 instance we launched in our VPC without any public ip and is private right now


2. Next go the "Network Interfaces" and select the Network Interface you want to detach and reassign in our case it is "Test Network Interface" which we created in previous post. Right click on it and click Detach.


3. Next go to your Ec2 instances and select the instance with which you want to associate the "Test Network Interface", right click select-------> Networking-----> Attach Network Interface


4. Next add the Instance ID and check the Network ID, click attach.


5. Now if you check your EC2 instance you should have an "Elastic IP/ Public IP " assigned to your Ec2 instance.


6. If you select the Network Instance it would show the Details of the Ec2 instance it is attached to.

0 comments:

Post a Comment