AWS Elastic Block Store (EBS)

Postgraduate in Communications Engineering with working experience in the Support Desk and self-study in software development.
Search for a command to run...

Postgraduate in Communications Engineering with working experience in the Support Desk and self-study in software development.
The git log command is used to view the commit history of a Git repository. You can customize the output format to show specific details in a more readable or structured way. Below are some useful variations and formatting options for git log: To sh...

Overview This article will teach us how to: Install Ubuntu Server 24.04 on a laptop from scratch Install Ubuntu server by using Vagrant tool with ISO image Prerequisites: A laptop without any OS installed; A virtualization software Virtualbox t...

The /etc/passwd and /etc/shadow files are the backbone of Linux user management. Together, they store user account information and handle authentication securely. This article provides a hands-on guide to understanding these files, their structure, a...

In Linux, links are powerful tools that allow you to create references to files and directories. There are two main types of links: hard links and soft links (also known as symbolic links or symlinks). Understanding the differences between these two ...

A hostname is a human-friendly name given to a computer. It is a unique identifier that allows us to identify the machine in various network communications, making it easier to locate and manage devices. Type: hostname To see where it is stored, typ...

Amazon EBS is a block storage service that provides scalable and persistent storage volumes. They behave like raw, unformatted block devices. You can mount these volumes as devices on your EC2 instances. EBS volumes are essentially like virtual hard drives that can be used to store data, databases, and application files and they persist independently from the life of the instance. A file system can be created on top of these volumes, or used in any way you would use a block device (such as a hard drive). You can dynamically change the configuration of a volume attached to an instance.
It is recommended to use Amazon EBS for data that must be quickly accessible and requires long-term persistence.
EBS volumes are available in different types optimized for different workloads, including:
General Purpose SSD (gp2 and gp3) - balance price and performance for a wide variety of transactional workloads. These include virtual desktops, medium-sized single-instance databases, latency-sensitive interactive applications, development and test environments, and boot volumes. Recommended for most workloads.
Provisioned IOPS SSD (io1 or io2) - the highest-performance Amazon EBS storage volumes designed for critical, IOPS-intensive, and throughput-intensive workloads that require low latency.
Cold HDD (sc1) - The lowest-cost HDD design for less frequently accessed workloads.
Throughput Optimized HDD (st1) - provide low-cost magnetic storage that defines performance in terms of throughput rather than IOPS. Designed to support frequently accessed data.
They differ in performance characteristics and price, allowing you to tailor your storage performance and cost to the needs of your applications
There are 3 ways of creating an EBS Volume:
Create and attach EBS volumes when you launch instances;
Create an EBS volume from a previously created snapshot and attach it to a running instance.
Create an empty EBS volume and attach it to a running instance.
In this hands-on, we will create an empty EBS and attach it to the running EC2 instance using AWS Management Console and AWS CLI.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the navigation pane, choose Volumes.
Choose Create volume.

For Volume type, choose the type of volume to create.
For Size, enter the size of the volume, in GiB.
(io1, io2, and gp3 only) For IOPS, enter the maximum number of input/output operations per second (IOPS) that the volume should provide.
(gp3 only) For Throughput, enter the throughput that the volume should provide, in MiB/s.
For Availability Zone, choose the Availability Zone in which to create the volume. A volume can be attached only to an instance that is in the same Availability Zone.
For Snapshot ID, keep the default value (Don't create volume from a snapshot).
Set the encryption status for the volume.
If your account is enabled for encryption by default, then encryption is automatically enabled and you can't disable it. You can choose the KMS key to use to encrypt the volume.
If your account is not enabled for encryption by default, encryption is optional. To encrypt the volume, for Encryption, choose Encrypt this volume and then select the KMS key to use to encrypt the volume.

(Optional) To assign custom tags to the volume, in the Tags section, choose Add tag, and then enter a tag key and value pair.
Choose Create volume.

To use the volume, attach it to an instance.

To create an empty Amazon Elastic Block Store (EBS) volume using the AWS Command Line Interface (CLI), use the create-volume command.
aws ec2 create-volume --availability-zone us-east-1a --size 10 --volume-type gp2
Replace the placeholders with the appropriate values:
<availability-zone>: The AWS availability zone where you want to create the volume. For example, "us-east-1a".
<size-in-gigabytes>: The size of the volume you want to create, in gigabytes.
<volume-type> (optional): The EBS volume type you want to create (e.g., "gp2" for General Purpose SSD, "io1" for Provisioned IOPS SSD, etc.). If not specified, it will default to "gp2".