Swiftorial Logo
Home
Swift Lessons
Matchups
CodeSnaps
Tutorials
Career
Resources

Amazon EBS Overview

What is Amazon EBS?

Amazon Elastic Block Store (EBS) provides block level storage volumes for use with Amazon EC2 instances. EBS volumes are designed for high availability and durability, making them suitable for a range of workloads including databases and file systems.

EBS volumes persist independently from the running life of an EC2 instance, meaning you can detach and attach EBS volumes as required.

EBS Features

  • Persistence: Data is retained beyond the life of the instance.
  • Scalability: Easily scale your storage based on your needs.
  • Snapshotting: Create backups of data for recovery and redundancy.
  • Performance: High IOPS and throughput for demanding applications.
  • Encryption: Secure your data at rest and in transit.

Creating an EBS Volume

Follow these steps to create an EBS volume:


graph TD;
    A[Start] --> B[Open AWS Console]
    B --> C[Navigate to EC2 Dashboard]
    C --> D[Select "Volumes" under "Elastic Block Store"]
    D --> E[Click "Create Volume"]
    E --> F[Configure Volume Settings]
    F --> G[Click "Create Volume"]
    G --> H[Done]
            

Use the following command in AWS CLI to create an EBS volume:


aws ec2 create-volume --size 10 --availability-zone us-east-1a --volume-type gp2
                

Best Practices for Using EBS

  • Choose the right volume type based on your workload.
  • Create snapshots regularly for data protection.
  • Monitor volume performance using CloudWatch.
  • Use encryption for sensitive data.
  • Consider using Auto Scaling for increased reliability.

Frequently Asked Questions

What is the difference between EBS and S3?

EBS is block storage designed for use with EC2, whereas S3 is object storage for storing data in a scalable way.

Can I detach an EBS volume from an EC2 instance?

Yes, you can detach an EBS volume from an EC2 instance and attach it to another instance.

What are the maximum and minimum sizes for an EBS volume?

The minimum size is 1 GiB and the maximum size varies based on the volume type, with some types supporting up to 64 TiB.