banner



How To Create Efs Using Cloud Formation Template

AWS CloudFormation EFS Example Template

This template is used to create a CloudFormation stack that implements, at a minimum, the following resource:

  • a unmarried EFS FileSystem
  • a single Mount Target
  • a Security Grouping associated with the Mountain Target(s).

In its electric current country the template is capable of provisioning upwards to iii Mount Targets associated with the EFS FileSystem. To provision Mount Targets in add-on to the kickoff Mount Target, provide additional subnet-ids in the optional Mount Target ii and Mount Target three subnet parameters. If you add additional Mount Targets to the configuration, it is recommended that the 2d and third Mount Targets are provisioned into a subnet that is associated with a dissimilar Availability Zone from the subnet associated with the beginning Mount Target.

The Origin Security Group designated for access to the Mount Target Security Group must exist in a subnet within the same VPC as the Mount Target(s), and/or exist routable from within the VPC associated with the Mountain Target Security Group."

EFS Diagram


Getting Started


At a minimum, access to an AWS Business relationship and permissions to deploy all of the resources divers in the template from the CloudFormation console is required. If you would like to deploy the template from the commandline, a prepare of CLI credentials with permissions to deploy all of the resources defined in the template and the installation and configuration of AWS CLI is required.


Prerequisites


  • Installing AWS CLI: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html

  • Configuring AWS CLI: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html


Deploying the Template via AWS CLI


Create a params.json file to shop the template parameter values:

              [     "Encryption=true",     "FileSystemName=JohnDoeTestFS",     "PerformanceMode=generalPurpose",     "ThroughputMode=bursting",     "KmsKeyId=None",     "VpcId=vpc-0011223344556677"     "MountTarget1Subnet=subnet-00a1122334455b678",     "MountTarget2Subnet=None",     "MountTarget3Subnet=None",     "FileSharePort=2049",     "OriginSecurityGroup=sg-0011223344556677" ]                          

Create the tags.json file and populate with all necessary tags.

Example:

              [     "Business_Unit=1Strategy",     "Owner=John Doe",     "Project=Bastion Host" ]                          

Deploy the template to your account:

              aws cloudformation deploy \     --template-file efs.yaml \     --stack-name JohnDoeTestEFS \     --tags file://tags.json \     --region "united states of america-east-one" \     --parameter-overrides file://params.json                          

Mounting EFS Mount Targets


AWS Linux / RHEL / CentOS / Fedora

              sudo yum -y install nfs-utils sudo mkdir /mnt/efs sudo mount -t nfs -o nfsvers=four.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport $mountain-target-ip-address:/ /mnt/efs                          

Debian / Ubuntu

              sudo apt-get install -y nfs-common sudo mkdir /mnt/efs sudo mountain -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport $mount-target-ip-accost:/ /mnt/efs                          

Authors


  • Volition Nave - 1Strategy

License


Copyright 2019 1Strategy

Licensed under the Apache License, Version two.0 (the "License"); yous may non utilise this file except in compliance with the License. Y'all may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "Every bit IS" Basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either limited or unsaid. See the License for the specific language governing permissions and limitations under the License.


References


  • Amazon Elastic File Arrangement Sample Template: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-efs.html
  • AWS CloudFormation All-time Practices: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html
  • EFS User Guide: https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html
  • Mounting EFS Mount Targets using an IP Accost: https://github.com/awsdocs/amazon-efs-user-guide/blob/principal/doc_source/mounting-fs-mount-cmd-ip-addr.doctor

How To Create Efs Using Cloud Formation Template,

Source: https://github.com/1Strategy/efs-starter-template

Posted by: davisgostain.blogspot.com

0 Response to "How To Create Efs Using Cloud Formation Template"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel