Day - 04 | EC2 Instance Storage | AWS Cloud Practitioner Certification CLF-C02

Day - 04 | EC2 Instance Storage | AWS Cloud Practitioner Certification CLF-C02

➤ EC2 Instance Storage

☞ EBS Volumes

  • What’s an EBS Volume?
  • EBS Volume
  • EBS – Delete on Termination attribute
  • EBS Snapshots
  • EBS Snapshots Features

☞ EFS: Elastic File System

☞ EFS Infrequent Access (EFS-IA)

☞ Amazon FSx – Overview

  • Amazon FSx for Windows File Server
  • Amazon FSx for Lustre

☞ EC2 Instance Store

☞ Shared Responsibility Model for EC2 Storage

☞ AMI Overview

  • AMI Process (from an EC2 instance)

☞ EC2 Image Builder


EBS Volumes

⇼⇼❯ What’s an EBS Volume?

Amazon Elastic Block Store (EBS) provides persistent block storage volumes for use with Amazon EC2 instances in the AWS Cloud. Each EBS volume is automatically replicated within its Availability Zone to protect you from component failure, offering high availability and durability. It allows your instances to persist data, even after their termination. They can only be mounted to one instance at a time (at the CCP level). Free tier: 30 GB of free EBS storage of type General Purpose (SSD) or Magnetic per month.


⇼⇼❯ EBS Volume

EBS volumes can be attached to any running instance that is in the same Availability Zone. Once attached, they function as raw, unformatted block devices. You can format an EBS volume with a file system and mount it.

  • It’s a network drive (i.e. not a physical drive) which uses the network to communicate the instance, which means there might be a bit of latency. It can be detached from an EC2 instance and attached to another one quickly
  • IAn EBS Volume in us-east-1a cannot be attached to us-east-1b. To move a volume across, you first need to snapshot it
  • Have a provisioned capacity (size in GBs, and IOPS). You get billed for all the provisioned capacity. You can increase the capacity of the drive over time.

EBS Volume


⇼⇼❯ EBS – Delete on Termination attribute

This attribute determines whether an EBS volume is deleted when its associated EC2 instance is terminated. By default, the root EBS volume of an instance has the "Delete on Termination" attribute set to true, meaning it will be deleted when the instance is terminated. For additional volumes, this attribute is set to false by default.


⇼⇼❯ EBS Snapshots

EBS Snapshots are point-in-time copies of your EBS volumes. Snapshots are stored in Amazon S3, providing a durable, off-instance storage. They can be used to create new EBS volumes or to back up data. Snapshots can be Can copied across AZ or Region.


⇼⇼❯ EBS Snapshots Features

  • Incremental Backups(EBS Snapshot Archive): Only changes since the last snapshot are saved, reducing time and storage costs. Move a Snapshot to an ”archive tier” that is 75% cheaper. Takes within 24 to 72 hours for restoring the archive
  • Encryption: Snapshots of encrypted volumes are automatically encrypted.
  • Cross-Region Copy: Snapshots can be copied to other AWS regions for disaster recovery.
  • Fast Snapshot Restore: Enables low-latency, fully initialized volumes.
  • Recycle Bin for EBS Snapshots: Setup rules to retain deleted snapshots so you can recover them after an accidental deletion. Specify retention (from 1 day to 1 year)


EFS: Elastic File System

Amazon Elastic File System (EFS) provides a simple, scalable, elastic file system for Linux-based workloads for use with AWS Cloud services and on-premises resources. It is designed to be highly available and durable, automatically growing and shrinking as you add and remove files. Managed NFS (network file system) that can be mounted on 100s of EC2. EFS is expensive (3x gp2), pay per use with no capacity planning.


EFS: Elastic File System


EFS Infrequent Access (EFS-IA)

EFS-IA is a storage class that provides price/performance optimization for files not accessed every day. It offers a lower storage cost compared to standard EFS storage, with a higher access latency and a lower throughput. EFS-IA provides up to 92% lower cost compared to EFS Standard. EFS will automatically move your files to EFS-IA based on the last time they were accessed. User can enable EFS-IA with a Lifecycle Policy.


EFS Infrequent Access (EFS-IA)


Amazon FSx – Overview

Amazon FSx offers fully managed, scalable file storage built on popular file systems, enabling you to easily launch and run file systems optimized for a wide variety of workloads. Launch 3rd party high-performance file systems on AWS. Fully managed service:

  • FSx for Lustre
  • FSx for Windows File Server
  • FSx for NetApp ONTAP


Amazon FSx – Overview


⇼⇼❯ Amazon FSx for Windows File Server

  • A fully managed, highly reliable, and scalable Windows native shared file system
  • Built on Windows File Server
  • Supports SMB protocol & Windows NTFS
  • Integrated with Microsoft Active Directory
  • Can be accessed from AWS or your on-premise infrastructure


⇼⇼❯ Amazon FSx for Lustre

Amazon FSx for Lustre provides a high-performance file system optimized for fast processing of workloads such as machine learning, high-performance computing (HPC), and media data processing. The name Lustre is derived from “Linux” and “cluster”. Amazon FSx Scales up to 100s GB/s, millions of IOPS, sub-ms latencies.

Key features include:

  • High Throughput and Low Latency: Built for speed.
  • Seamless Integration: Integrates with Amazon S3.


EC2 Instance Store

Instance Store provides temporary block-level storage for your EC2 instances. This storage is physically attached to the host computer that provides your EC2 instance.

Key characteristics:

  • EBS volumes are network drives with good but “limited” performance
  • If you need a high-performance hardware disk, use EC2 Instance Store
  • Better I/O performance
  • EC2 Instance Store lose their storage if they’re stopped (ephemeral)
  • Good for buffer / cache / scratch data / temporary content
  • Risk of data loss if hardware fails
  • Backups and Replication are your responsibility


Shared Responsibility Model for EC2 Storage

  • AWS: Responsible for the underlying infrastructure and the reliability of EBS, EFS, and FSx services.
  • Customer: Responsible for managing data, encryption, access control, and implementing backup strategies.


Shared Responsibility Model for EC2 Storage

AMI Overview

An Amazon Machine Image (AMI) provides the information required to launch an instance, which is a virtual server in the cloud. You specify an AMI when you launch an instance, and you can launch multiple instances from a single AMI. AMI have Faster boot / configuration time because all your software is pre-packaged. You can launch EC2 instances from:

› A Public AMI: AWS provided

› Your own AMI: you make and maintain them yourself

› An AWS Marketplace AMI: an AMI someone else made (and potentially sells)


Amazon Machine Image (AMI)

AMIs include:

  • Template for the root volume: Operating system, application server, and applications.
  • Launch permissions: Controls which AWS accounts can use the AMI to launch instances.
  • Block device mapping: Specifies the volumes to attach to the instance.


⇼⇼❯ AMI Process (from an EC2 instance)

  • Configure Instance: Set up your EC2 instance with the desired configuration.
  • Create Image: Use the AWS Management Console, CLI, or SDK to create an AMI from your instance.
  • Instance Snapshot: AWS takes snapshots of the instance's root volume and any additional EBS volumes.
  • Register AMI: AWS registers the snapshots as an AMI.
  • Launch Instances: Use the AMI to launch new instances with the same configuration.


EC2 Image Builder

EC2 Image Builder simplifies the creation, maintenance, validation, and sharing of EC2 AMIs. It automates the image creation process, ensuring that images are up-to-date and compliant with your security and compliance requirements. Key features include:

  • Image Pipelines: Define the end-to-end image creation workflow.
  • Custom Recipes: Specify the software packages and configurations.
  • Automated Testing: Validate images with tests.
  • Distribution: Share AMIs across AWS accounts and regions.
  • EC2 Image Builder Can be run on a schedule (weekly, whenever packages are updated, etc…)
  • Free service (only pay for the underlying resources)


EC2 Image Builder

Happy Learning !




Carlos Cabezas Lopez

Digital Marketer | Cyber Security Practitioner (Ce-CSP) | CISMP | ISO 27001 | ITF+ | CCSK

5mo

What's up with the LinkedIn connections today? Love the energy. Stay tuned for Day 5, diving deep into EС2 instances storage strategies. #AWSCommunity

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics