0% found this document useful (0 votes)
1 views

Amazon Elastic file System

Amazon Elastic File System (EFS) is a scalable, serverless file storage service for AWS that provides shared file access for applications running on AWS and on-premises servers. EFS automatically adjusts storage capacity as files are added or removed, and supports high throughput for multiple clients simultaneously. The document also outlines the process for creating and managing EFS file systems, including security configurations and mounting options.

Uploaded by

manoj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Amazon Elastic file System

Amazon Elastic File System (EFS) is a scalable, serverless file storage service for AWS that provides shared file access for applications running on AWS and on-premises servers. EFS automatically adjusts storage capacity as files are added or removed, and supports high throughput for multiple clients simultaneously. The document also outlines the process for creating and managing EFS file systems, including security configurations and mounting options.

Uploaded by

manoj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Amazon Elastic file System

What are EFS in AWS?

Amazon Elastic File System (Amazon EFS) is a simple, serverless, set-and-forget,


elastic file system. There is no minimum fee or setup charge. You pay only for the
storage you use, for read and write access to data stored in Infrequent Access
storage classes, and for any provisioned throughput.

Why EFS is used in AWS?


Amazon EFS provides shared file storage for use with compute instances in
the AWS Cloud and on-premises servers. Applications that require shared file
access can use Amazon EFS for reliable file storage delivering high aggregate
throughput to thousands of clients simultaneously.

What are AWS EFS vs S3?

Amazon S3 (Amazon Simple Storage Service) is an object storage designed for


storing large numbers of user files and backups. Amazon EFS (Amazon Elastic File
System) provides scalable network file storage for Amazon EC2 cloud computing
service users.
How it works
Amazon Elastic File System (EFS) automatically grows and shrinks as you add and
remove files with no need for management or provisioning.

To create an EFS file system using Amazon EFS Quick Create


1. Open the Amazon EC2 console
at https://console.aws.amazon.com/ec2/.
2. Choose Launch instance.
3. (Optional) Under Name and tags, for Name, enter a name to
identify your instance.
4. Under Application and OS Images (Amazon Machine Image),
choose a Linux operating system, and then for Amazon Machine
Image (AMI), select a Linux AMI.
5. Under Instance type, for Instance type, select an instance type
or keep the default.
6. Under Key pair (login), for Key pair name, choose an existing
key pair or create a new one.
7. Under Network settings, choose Edit (at right), and then
for Subnet, select a subnet.

Note

You must select a subnet before you can add an EFS file system.
8. Under Configure storage, choose Edit (at bottom right), and then
do the following:
a. Make sure that EFS is selected.
b. Choose Add shared file system.
Troubleshooting tip

If Add shared file system is not visible, you must first select
a subnet.
c. For File system, select an existing file system, or
choose Create new shared file system and create a file
system using Amazon EFS Quick Create.
d. For Mount point, specify a mount point or keep the default.
e. To enable access to the file system, select Automatically
create and attach security groups. By selecting this check
box, the necessary security groups will automatically be
created and attached to the instance and the mount targets of
the file system, as follows:
 Instance security group – Includes an outbound rule that
allows traffic over the NFS 2049 port, but includes no
inbound rules.
 File system mount targets security group – Includes an
inbound rule that allows traffic over the NFS 2049 port
from the instance security group (described above), and
an outbound rule that allows traffic over the NFS 2049
port.
You can choose to manually create and attach the security
groups. If you want to manually create and attach the security
groups, clear Automatically create and attach the
required security groups.
f. To automatically mount the shared file system when the
instance launches, select Automatically mount shared file
system by attaching required user data script. To view
the user data that is automatically generated,
expand Advanced details, and scroll down to User data.

Note

If you added user data before selecting this check box, the
original user data is overwritten by the user data that is
automatically generated.
9. Configure any other instance configuration settings as needed.
10. In the Summary panel, review your instance configuration,
and then choose Launch instance. For more information,
see Launch an instance using the new launch instance wizard

Amazon EFS (Elastic File System)


What is Amazon EFS?


Amazon EFS is a cloud-based file storage service for applications and
workloads that run in the Amazon Web Services public cloud.

AWS automatically deploys and manages the infrastructure for Elastic File
System (EFS), which is distributed across an unlimited number of servers
to avoid performance bottlenecks. Amazon EFS provides flexible storage
capacity that scales to accommodate workloads that run on AWS Elastic
Compute Cloud (EC2) instances and access files through application
programming interface (API) requests.

Amazon EFS is designed to be highly available and durable for thousands


of EC2 instances that are connected to the service. Amazon EFS stores
each file system object in multiple availability zones (AZs); an IT
professional can access each file system from different AZs in the region it
is located. The service also supports periodic backups from on-premises
storage services to EFS for disaster recovery.

IT operations staff can mount an existing file system on an EC2 Linux


instance to access it within Amazon EFS or create and manage a new file
system from the AWS Management Console, AWS Command Line
Interface, Amazon EFS API or AWS software development kits (SDKs).
The Management Console, API and SDK also enable administrators to
delete systems and configure access and tags.

The Network File System v4.1 protocol mounts an EFS system on an EC2
instance or an on-premises server to give the service access to data and to
enable it to read and write to the file system. The Secure Copy feature
transfers non-AWS hosted data to EFS. There must be an established
cloud connection via AWS Direct Connect to access on-premises file
systems.

The service includes file system access facilities, such as data consistency
and file locks. An administrator controls access to the service through AWS
Identity and Access Management roles and limits network access
through Amazon Virtual Private Cloud (VPC) security groups.

Amazon EFS includes default General Purpose performance mode and


Max I/O performance mode. An admin can opt for the latter performance
mode, which scales to higher throughput levels at the expense of latency
for applications with many attached instances.

Pricing for EFS is based on the storage capacity that the file system service
uses.

EFS Hands on

Create a new security group


Security group created successfully

Go to EFS and create a new file system

Give a name and click on customize


Don’t change anything

Click on next

Remove all default security and select efs security group which we created before
Click on next

Don’t select anything it will make charges

Just review it
Click on create

We have created a file system for efs

Go to Access points

Search with access point which we created


Click on create access point
Access point created successfully

Mounting EFS file systems


In the following sections you can learn how to mount your Amazon EFS file
system using the Amazon EFS mount helper. In addition, learn how to
automatically remount your file system after any system restarts using
the file fstab file. Using the EFS mount helper, you have the following
options for mounting your Amazon EFS file system:

 Mounting on supported EC2 instances


 Mounting with IAM authorization
 Mounting with Amazon EFS access points
 Mounting with an on-premise Linux client
 Auto-mounting EFS file systems when an EC2 instance reboots
 Mounting a file system when creating a new EC2 instance
Install the below command thru git bash
sudo yum install -y amazon-efs-utils

To automatically mount a file system using an EFS access point, add the
following line to the /etc/fstab file.
Syntax:
file-system-id:/ efs-mount-point efs _netdev,noresvport,tls,iam,accesspoint=access-
point-id 0 0

Actual:

fs-096a52efc1df35cb4
:/ efs-mount-point efs _netdev,noresvport,tls,iam,accesspoint= fsap-0a7de68c8759559ac 0 0

Here we have file system id from file systems

We can take access point id from here


Open vim /etc/fstab

fs-096a52efc1df35cb4
/var/www/html/img efs _netdev,noresvport,tls,iam,accesspoint= fsap-0a7de68c8759559ac 0 0

Save the vm editor using: wq

Test this using below command

Mount -fav

It will show the message like successfully mounted if its throwing time out error check security
groups whether its allowing access from your web circle.

Got to instance>actions->Image and templates->create image on ec2

Five the file name and click on create image

Image created successfully


Got to AMIs under image tab
Auto Scaling group Introduction:

What is Auto Scaling in AWS?

AWS Auto Scaling monitors your applications and automatically adjusts


capacity to maintain steady, predictable performance at the lowest possible
cost. Using AWS Auto Scaling, it's easy to setup application scaling for multiple
resources across multiple services in minutes.

AWS Auto Scaling monitors your applications and automatically adjusts capacity to
maintain steady, predictable performance at the lowest possible cost. Using AWS
Auto Scaling, it’s easy to setup application scaling for multiple resources across
multiple services in minutes. The service provides a simple, powerful user interface
that lets you build scaling plans for resources including Amazon EC2 instances and
Spot Fleets, Amazon ECS tasks, Amazon DynamoDB tables and indexes,
and Amazon Aurora Replicas. AWS Auto Scaling makes scaling simple with
recommendations that allow you to optimize performance, costs, or balance between
them. If you’re already using Amazon EC2 Auto Scaling to dynamically scale your
Amazon EC2 instances, you can now combine it with AWS Auto Scaling to scale
additional resources for other AWS services. With AWS Auto Scaling, your
applications always have the right resources at the right time.

It’s easy to get started with AWS Auto Scaling using the AWS Management Console,
Command Line Interface (CLI), or SDK. AWS Auto Scaling is available at no
additional charge. You pay only for the AWS resources needed to run your
applications and Amazon CloudWatch monitoring fees.

What is Auto Scaling in EC2?


Amazon EC2 Auto Scaling helps you maintain application availability and lets
you automatically add or remove EC2 instances using scaling policies that you
define. Dynamic or predictive scaling policies let you add or remove EC2 instance
capacity to service established or real-time demand patterns.
Auto scaling groups hand on

EC2->target groups

Create a target group name and give name rest of the things as its
Click on next
We have instance doesn’t matter
Click on create target groups
Target group created successfully

The go to load balancer creates new one


Already created go with application load balancer and select all regions and click on create load
balancer

Load balancer is active now

Go to launch template
Already im having templates

Already having AMIs

Go to auto scaling groups


Click on create autoscaling group
Give a proper name and give a name for launch template

Here we have switch to launch configuration its similar to launch template

Click on next

Based on the requirement we can select zones


Click on next
Health check is optional

Health check use to if instance is unhealthy deleted then it will create new instance then it will turn
to healthy instance.

If the health check process is responding then its healthy

If it’s not responding then it will be unhealthy

Auto scaling process will delete the unhealthy instance and then create a new one instance.
Desired capacity is nothing but instance

If its minimum 2 instance we can’t remove the two instances from auto scaling groups

If its maximum 8 instances we can’t add more than 8 instance.

Based on the requirements we can set the desired instance


You can add notification

Add tags
Created auto scaling group

Go to Target groups

Target groups all are in healthy state

Start instance refresh


Just delete the instances that was created for auto scaled groups

Now instance is terminated

Go to auto scaling groups

Verified that if instance is deleted then deleted instance will start automatically due to auto scaling
groups

If you modify any existing instance it will gone and it will create new instance.
See here webserver instance is running now

Again go to auto scaling groups and Now you can see all are successful

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy