How can I move EC2 instances to a different subnet?

前端 未结 4 1134
不思量自难忘°
不思量自难忘° 2021-01-31 01:57

I have a VPC set up in AWS. we have created 2 subnets (A/24 and B/24), straight using all the IP having no IP\'s/Subnets for further usage.

We find that the b/24 is not

4条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 02:47

    Creating smaller subnets is pretty straight forward. Delete the subnet and create new subnets. However, you'll want to transition off the boxes in B/24 before you delete it.

    Now, moving a running machine between subnets is not possible*. Depending on your application and your requirements, I imagine that shutting it down, taking an image of the machine, then launching a new instance of that machine in the other subnet will work.

    *As an aside, I wondered if you could attach a new network interface from a new subnet and then remove your old network interface, effectively moving subnets without having the take the box down. As it turns out, you cannot remove the network interface at index 0, which means this does not work.

提交回复
热议问题