Amazon Elastic file System
Amazon Elastic file System
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
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.
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.
Pricing for EFS is based on the storage capacity that the file system service
uses.
EFS Hands on
Click on next
Remove all default security and select efs security group which we created before
Click on next
Just review it
Click on create
Go to Access points
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
fs-096a52efc1df35cb4
/var/www/html/img efs _netdev,noresvport,tls,iam,accesspoint= fsap-0a7de68c8759559ac 0 0
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.
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.
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
Go to launch template
Already im having templates
Click on next
Health check use to if instance is unhealthy deleted then it will create new instance then it will turn
to healthy instance.
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
Add tags
Created auto scaling group
Go to Target 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