AWS EBS Exercises

How can I attach a new EBS volume to a running Amazon EC2 Windows instance

  • Login to¬†AWS Console
  • Create an Windows EC2 instance or you can use an existing EC2 instance.
  • Go to left panel of the EC2 AWS Console and select the “Elastic Block Store-> Volumes” Option
  • Create the volume and select the parameters given below image.
    • Select Volume type as General Purpose SSD (gp2)
    • Volume size given as 1 GiB (minimum size provided for demo purpose
    • Select the Availability Zone where your EC2 instance launched. Here I have selected ‘ap-south-1’ as my instance is running in ‘ap-south-1’ Az.
  • Once your volume is created, you can attach to you EC2 instance. Click on “Actions -> Attach Volume” to attach the volume to EC2 Instance.

  • From the Instance edit box, click and select your EC2 instance to add this volume. Only instances in the same Availability Zone as the selected volume are displayed.
  • Select Attach button to add the volume to your Instance. Now The volume has been added. You can verify the same in your Windows Instance.
  • Connect to Windows Instance and Open File Explorer. You may not see your latest attached volume. You can refer and study more about volume mapping.
  • You can Open the Windows ‘Disk Management‘ by typing disk partitions as shown below. You can manually map there.
  • You can also run the below script from the instance to map the volume automatically.
  • Go to the location “C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts” and run the ‘InitializeDisks’ powershell file. The script will do the job. Now the new drive will mapped to your EC2 Instance.

How to detach a Boot Drive and Re-attach to another Instance


How to take a Snapshot of a EBS volume and restore it again from the snapshot

How to create an AMI From a Snapshot and Launch a new EC2 Instance from the created AMI

How to launch an Encrypted Volume and attached to an running instance.

How to copy a snapshot to other AWS region and create AMI, launch an instance from the new Region

AWS EBS Exercises

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top