
A Use Case for this is when you have a dedicated instance that you’d like to reuse for another purpose.
There is a quicker way to clone an instance when using on-demand instances. That is by creating and using an AMI.
- Prior to Setup
- Determine the Availability Zone you want to use.
- Note the Security Group of the existing EC2 instance.
- Create a Snapshot from the instance you wish to clone.
- On the EC2 Dashboard, navigate to Elastic Block Store >> Volumes.
- Identify the Instance you wish to clone in the Attachment Information column.
- Actions >> Create Snapshot
- Create a Volume from the Snapshot.
- On the EC2 Dashboard, navigate to Elastic Block Store >> Snapshots.
- Identify the Snapshot from which you wish to create a Volume.
- Actions >> Create Volume
- IMPORTANT!: Choose the desired Availability Zone.
- Note the Volume Id.
- Create an EC2 Instance in the desired Availability Zone.
- Choose the same Security Group as the modeled instance.
- Follow the steps in the Wizard.
- Once the Instance has started, stop the instance.
- Force Detach the existing Volume from the Instance.
- On the EC2 Dashboard, navigate to Elastic Block Store >> Volumes.
- Actions >> Force Detach
- Optional but recommended. Actions >> Delete
- Attach the cloned Volume.
- On the EC2 Dashboard, navigate to Elastic Block Store >> Volumes.
- Actions >> Attach
- Choose the desired instance and specify the Device.
- Start the EC2 Instance.
- On the EC2 Dashboard, navigate to Instances >>Instances.
- Actions >> Instance State >> Start
Feature Photo by Robin Spielmann on Unsplash