Adding more disk space (EBS volumes) to your instance
The AWS Server AMI comes with an attached 30 GB EBS volume. If you need more space, you can create additional volumes and attach them to your EC2 instance.
The steps below explain how to create a new EBS volume and attach it to your EC2 running instance.
- Open the AWS Management Console and make sure the Amazon EC2 tab is selected.
- From the left menu, click Volumes.
- Click the Create Volume button.
- Type a value for Size. Remember that you will be charged by Amazon for the size you choose, and you cannot change this size once you’ve created the volume.
- Choose a value for Availability Zone. You need to match the zone of the EC2 instance to which you will attach the volume.If you don’t know the zone of the instance to which you want to attach the volume, return to the AWS Management Console, click Instances, click your instance, then examine the Description tab to find the zone.
- Optionally, choose a snapshot. Snapshots are a way of preformatting a disk with certain datasets. To create a new empty disk, choose No Snapshot.
- Click Create to create the volume. This can take a while. When the volume is ready, you’ll see its status change from creating to available in AWS Management Console.You’ve successfully created your EBS volume, but it’s not attached to your EC2 instance yet. The remaining steps explain how to format the disk and attach it to your instance.
- Right-click the volume and click Attach Volume.
- Choose your instance from the drop-down list. Remember that you can only attach your volume to instances that reside in the same availability zone.
- Type the four-letter code for an available Windows device, such as xvdf, and click Attach.It may take a few minutes to attach your volume. You can see the status in the Attachment Information column in the AWS Management Console list of volumes. After a while, attaching changes to attached.
- Log in to your EC2 instance using Windows Remote Desktop.
- Click Start and type diskmgmt.msc in the search box. Then press ENTER.At this point a message may appear about choosing a partition style. If this happens, you can go to Step 16 and continue from there.
- In the bottom section of the Disk Management console, scroll through the list of disks until you find a unallocated disk matching the size of the volume you just attached.
- Right-click the disk and click Online.
- Right-click the disk again and click Initialize Disk.
- Ensure your new disk is checked and choose a partition style (if you are unsure which partition style to use, choose MBR). Then click OK.Now you can choose to partition all or part of your disk and assign the partition(s) a drive letter.
- Right-click the diagonal striped area representing your disk’s unallocated space and click New Simple Volume.
- Follow the prompts in the New Simple Volume wizard to select the amount of space you want to assign to a drive and the drive letter you want to use. If you want the whole disk to be available as one standard drive, you can leave most of the defaults in this wizard. You may want to change Volume label to give the drive a name.