Wondering how to migrate EC2 instance to a VPC in same Region? We can help you!
Here at Bobcares, we handle requests from our customers to migrate the EC2-Classic instances to a virtual private cloud (VPC) as a part of our Server Management Services.
Today let’s see how our Support Engineers do this for our customers.
How to migrate EC2 instance to a VPC in same Region
To migrate your EC2-Classic instances to a VPC in the same Region of the same AWS account we can use the AWSSupport-MigrateEC2ClassicToVPC Automation document.
Before using this Automation document, we must verify the service quotas for the following resources in the VPC:
- Elastic IP addresses
- EC2 instances
- Security groups
And if necessary, we must increase the quotas before running the Automation.
Steps to Migrate an EC2-Classic instance to a VPC
Following are the steps that our Support Techs use to migrate EC2 instances:
1. Firstly we have to go to the AWS Systems Manager console,
2. Then select Automation and click Execute automation.
3. From the Automation document search box, we can search for MigrateEC2Classic.
4. We must select the radio button for the AWSSupport-MigrateEC2ClassicToVPC document, and click Next.
5. Now in the Input parameters, for InstanceId, we must provide our source EC2-Classic instance ID.
6. For AutomationAssumeRole and TargetInstanceType, we can select the required parameters. By default, TargetInstanceType is set to t2.xlarge.
7. And for or MigrationType, we can select Test or CutOver.
If we select CutOver for MigrationType, then we must set the following parameters:
SNSNotificationARNForApproval: Enter the ARN of the SNS topic used to send Approval notifications to stop the source instance. ApproverIAM: Enter the ARN of the IAM users or roles that can approve or reject the action to stop the source instance.
8. Finally we can click Execute.
[Need assistance? We can help you]
To conclude, we saw the steps that our Support Techs follow to migrate EC2 instance to a VPC in the same Region.