AWS Block Storage Contd..
Activity: Create ubuntu linux server
- Create an ubuntu linux server
- install apache2 and enable apache
sudo apt update sudo apt install apache2 -y sudo systemctl enable apache2
- Shutdown the ec2 instance
- Create the AMI
- The image (AMI) will be created and also a snapshot
- now terminate the ec2 instance and create a new ec2 instance with the AMI Created.
- This AMI can be copied to any region, the snapshot and AMI gets transferred and we can use this application in any aws region
- To share this AMI with any of your other organizational accounts
- The EBS volumes can be attached to only one instance at a time, but generally in our application configurations, we would have some data/application etc which are required to be shared by multiple ec2 instances.
Activity: File Share on the Linux VMs
- Create the following ubuntu vms
- in AZ-A
- in AZ-B
- AWS has a network file storage service for linux based vm’s which is called as Elastic file storage
- Lets understand how efs works with the below image
- Create a security group with access to vpc cidr
Lets create EFS
Now lets understand on how to attach efs to the vms
- Refer Here for understanding mounting steps
- Lets login into an ubuntu instance and mount. i had to install nfs common using the following command
sudo apt install nfs-common -y
- Now lets login into other vm in other az (in my case amazon linux instance)
sudo yum install amazon-efs-utils -y
- EFS can act as a network file storage for linux and mac vms within a region in aws
- EFS is scoped to one region, but we can replicate the data to other regions as well
- EFS Backups can be managed by backup vaults.
- If we have windows ec2 instances, efs cant be used as a network share
- If we want to use third party storage options in a managed fashion, AWS provides FsX