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.