Creating Encrypted EFS Using CloudFormation and EC2 Linux

There are multiple ways of storing information on an instance, like EBS or EFS. EBS is Elastic Block Storage and can be considered as if you have a high capacity Storage Device attached to your computer. Whereas EFS is Elastic File Storage and can be considered as if you have attached an external storage device attached to your computer. It may depend on your application or use case you choose to use what among both, but for our case, that we are discussing today, we are going to use encrypted EFS with EC2 Linux instance. 

Create EFS Using CloudFormation

Let's create EFS using CloudFormation. You can use the following template to create the resource.  Just pass the appropriate values when asked while creating the resource.

Creating EFS Using CloudFormation and Mounting it With EC2 Linux Instance

There are multiple ways of storing information on an instance, like EBS or EFS. EBS is Elastic Block Storage and can be considered as if you have a high capacity Storage Device attached to your computer. Whereas EFS is Elastic File Storage and can be considered as if you have attached an external storage device attached to your computer. It may depend on your application or use case you choose to use what among both, but for our case, that we are discussing today, we are going to use EFS with EC2 Linux instance. 

Create EFS Using CloudFormation

Let's create EFS using CloudFormation. You can use the following template to create the resource.  Just pass the appropriate values when asked while creating the resource.

Guide: How to Automate AWS Snapshots With CloudWatch

AWS Elastic Block Store (EBS) service leverages persistent block storage to store Elastic Cloud Compute (EC2) instances. EC2 instances are virtual servers running on AWS environments. EBS is useful for running containerized applications, big data analytics, relational and non-relational databases, and more.

EBS enables you to take snapshots of your volumes to backup your data and prevent data loss. This article explains the basics of AWS EBS snapshots, including an example of how to automate your snapshots with CloudWatch.

Serverless Approach to Backup and Restore EBS Volumes

Amazon Elastic Compute Cloud (EC2) instances use Elastic Block Storage (EBS) as a root volume as well as an additional data store for applications. It is necessary to select a proper EBS volume type depending upon the workload to achieve high performance and the right approach to backup EBS volumes reqularly in production environments. We need a solution to backup and restore application data from EBS volume snapshots at any point of time and we should not pay an unnecessary cost for archiving the older snapshots. This article covers choosing the right EBS volume type for your application and provides a mechanism to handle EBS snapshots using serverless technology.

EBS Volume Types

Amazon EBS provides different volume types which have different performance characteristics and cost models. We can choose the volume type based on our application requirements (the type of the workload) to achieve higher performance as well as saving overall storage cost. EBS volume is available in two different categories, SSD-backed volumes and HDD-backed volumes. SSD backed volumes are used when the workload is I/O intensive, like transactional workloads where frequent read-writes happens in an application. Its performance is rated in IOPS. HDD-backed volumes are used when an application requires continuous read and write to the disk at a cheaper rate with high throughput. Its performance is rated in throughput MiB/s.