How to Attach EBS Volume in EC2 Instance?
Last Updated :
24 Oct, 2025
Amazon Elastic Block Store (EBS) provides persistent block-level storage volumes for use with Amazon EC2 instances.1 Think of an EBS volume as a virtual hard drive that you can attach to your virtual server.
Its most important feature is persistence. By default, an EC2 instance's root volume is often deleted when the instance is terminated, meaning all data on it is lost. An attached EBS volume, however, exists independently. Its data remains intact even if the instance is terminated, and it can be detached and re-attached to another EC2 instance, making it essential for any application that needs to store data reliably.2
This guide will provide a step-by-step walkthrough for two common scenarios:
- Attaching a new volume when launching a new EC2 instance.
- Creating and attaching a volume to an already running EC2 instance.
- The crucial final steps of formatting and mounting the volume inside Linux to make it usable.
EBS Volume Types:
| Volume Type | Description & Use Case |
| General Purpose SSD (gp3, gp2) | The best balance of price and performance for most workloads. Ideal for boot volumes, web servers, and development/test environments. |
| Provisioned IOPS SSD (io2 Block Express, io1) | High-performance SSDs designed for I/O-intensive, critical workloads like large relational or NoSQL databases. |
| Throughput Optimized HDD (st1) | Low-cost Hard Disk Drive (HDD) designed for frequently accessed, high-throughput workloads like big data processing, data warehousing, and log processing. |
| Cold HDD (sc1) | The lowest-cost HDD storage for less frequently accessed data where the primary requirement is low storage cost. |
Step To Attach EBS Volume in EC2-Instance:
Step 1: Go to All services and click on EC2
Step 2: Click on the Launch Instance.
Step 3: Give the EC2 instance name or tag like the "EBS-Volume" name.
Step 4: Choose Amazon Machine Image for your instance.
Step 5: Choose an Instance type.
Step 6: Choose the Key Pair or Create the Key pair.
Step 7: Create the Security Group then open the port as per your requirement
Note: By Default EC2 root volume is attached with 8GB. '1' is showing the root volume.
Step 8: Click on the Add new Volume for the extra EBS Volume. '2' is denoting how to attach EBS
Step 9: Configure the EBS Size.
Step 10: Select the EBS type as per your requirement.
Step 11:Click on the Launch Instance button.
Now you can see both volume Root Volume 8GB and EBS Volume 10GB
Explore
DevOps Basics
Version Control
CI & CD
Containerization
Orchestration
Infrastructure as Code (IaC)
Monitoring and Logging
Security in DevOps