Knowledgebase

How do I set/resize my AWS instance storage size?

Resizing the storage of an AWS EC2 instance involves a few steps. The process depends on whether your instance is EBS-backed or instance-store-backed.

For EBS-backed Instances:

  1. Stop the Instance:

    • Before making any changes to the instance, it's recommended to stop it to prevent any potential data corruption.
  2. Open the AWS Console:

    • Log in to the AWS Management Console.
  3. Navigate to EC2 Dashboard:

    • Go to the EC2 Dashboard.
  4. Locate the Instance:

    • Find and select the instance for which you want to change the storage.
  5. Identify the Root Volume:

    • In the "Description" tab, find the "Root device" information. Note down the EBS volume ID.
  6. Create a Snapshot (Optional but recommended):

    • It's a good practice to create a snapshot of your existing volume before making any changes. This provides a backup in case something goes wrong.
  7. Modify Volume Size:

    • In the EC2 Dashboard, navigate to "Volumes" in the left-hand menu.

    • Find the EBS volume ID associated with your instance's root device. Select the volume and click on "Actions" > "Modify Volume".

    • Adjust the size of the volume and click "Modify".

  8. Start the Instance:

    • Go back to your instance in the EC2 Dashboard and click "Actions" > "Start".
  9. SSH into the Instance:

    • Once the instance is running, SSH into it.
  10. Resize the File System:

    • If you've extended the root volume, you'll need to extend the file system to utilize the additional space. The specific commands will depend on the operating system you're using.

For Instance-store-backed Instances:

Resizing the root volume of an instance-store-backed instance is more complex. It often involves creating an AMI (Amazon Machine Image) of the instance, launching a new instance from that AMI with a larger root volume, and migrating your data.

  1. Create an AMI:

    • Stop your instance and create an AMI from it.
  2. Launch a New Instance:

    • Launch a new instance from the AMI you created, selecting a larger root volume size.
  3. Migrate Data:

    • Once the new instance is running, you'll need to migrate your data from the old instance to the new one. This might involve copying files, databases, etc.
  4. Test and Verify:

    • After migrating, thoroughly test your new instance to ensure everything is working correctly.

Remember, always back up your data before making significant changes to your instances.

  • 0 Users Found This Useful
Was this answer helpful?