DEV Community

mahpara jabbar
mahpara jabbar

Posted on

EC2 Instance Data Persistence and Migration

This EC2 lab involves creating an EC2 instance with multiple volumes, accessing it via RDP, adding data to the volumes, creating an image of the instance, copying the image to a different region, and then verifying the persistence of data.
Summary:

  1. Create an EC2 Instance
  2. - Take the RDP of the Instance
  3. - Add Files and Folders
  4. - Create an Image of the Instance
  5. - Copy the Image to a Different Region
  6. - Create an Instance from the Copied Image in the New Region
  7. - RDP into the New Instance
  8. - Check Data Persistence

Step 1: Creating an EC2 instance:

  • Select Microsoft Windows Server.
  • Select t2.micro as the instance type.
  • Root volume (C-drive): Default size 30 GB.
  • Additional volume (D-drive): 20GB.
  • Launching the instance.

Image description

Step 2:Taking the RDP of this Instance:

  • Select your instance, and click on Connect.
  • Choose the RDP client tab, and note the public DNS.
  • Decrypt the password using your PEM file
  • Use an RDP client (like Microsoft Remote Desktop) to connect
  • Use Administrator as the username and the decrypted password.

Step 3: Adding Files and Folders:

  • Access the C-drive and D-drive within the RDP session.
  • Create folders and add files on both drives.

Step 4: Creating an Image of the Instance:

Image description

  • Name the image and add a description.
  • Include both volumes in the image.
  • Wait for the image (AMI) creation to complete.

Step 5: Copy the Image to a Different Region:

  • Choose the destination region.
  • Name the copied AMI and add a description.
  • Wait for the copy process to complete.

Image description

Step 6: Create an Instance from the Copied Image in that Region:

  • Switching to the destination region(Ohio).
  • Go to the AMIs section and select the copied AMI.
  • Ensuring the instance type and storage configuration are appropriate then Click on Launch.

Image description

Step 7: RDP into the New Instance:
Connecting it to the new instance using the same RDP process as before.

Step 8: Check Data Persistence
Verify the files and folders created in the C-drive and D-drive are present and unchanged.

Top comments (0)