In this recipe, we will use the Amazon EFS to provide network-based storage to instances.
Some of the benefits of using EFS compared to other AWS services are as follows:
- Guaranteed write order between distributed clients
- Automatic resizing—no need to preallocate and no need to downsize
- You only pay for the space you use (per GB)—no transfer or extra costs
This example works with the default VPC and subnets, present in all AWS accounts when they are created. Even if you have changed you network configuration, all you need is a working VPC with two or more subnets in different AZs for this recipe.
- Open your favorite text editor, and start a new CloudFormation template by defining the
AWSTemplateFormatVersion
andDescription
:
AWSTemplateFormatVersion: "2010-09-09" Description: Create an EFS file system and endpoints.
- Create a top-level
Parameters
section, and define the required parameters,VpcId
andSubnetIds
, inside it:
...