AWS Assignment– 5
EFS (Elastic File System) for Linux Learners
Basic Questions
- Create a new EFS file system using the AWS Console.
- Create an EFS file system using the AWS CLI.
- Launch a Linux EC2 instance in the same VPC as the EFS file system.
- Install NFS client utilities on your Linux instance.
- Create an EFS mount target in one Availability Zone.
- Mount the EFS file system to /mnt/efs on the EC2 instance.
- Create a text file inside /mnt/efs and verify persistence.
- Launch a second EC2 instance and mount the same EFS file system.
- Verify the file created on the first instance is visible on the second.
- Unmount the EFS file system using the umount command.
- Enable encryption at rest for your EFS file system.
- Mount the EFS with encryption in transit enabled.
- List all EFS file systems in your account using AWS CLI.
- List mount targets for a file system using AWS CLI.
- Restrict EFS access by modifying the Security Group to only allow NFS (2049).
- Test that an instance without SG access cannot mount the EFS.
- Configure IAM policy to restrict which users can mount EFS.
- Check CloudWatch metrics for your EFS file system.
- Create folders inside EFS and set different Linux permissions.
- Document in simple terms the difference between EFS, EBS, and S3.
Intermediate Questions
- Create an Access Point for your EFS file system.
- Mount the EFS using the Access Point from a Linux EC2 instance.
- Set a default POSIX user (UID/GID) in the Access Point and verify permissions.
- Create directories with different ownership inside EFS and test access.
- Enable General Purpose performance mode and test file access speed.
- Enable Max I/O performance mode and compare with General Purpose.
- Configure lifecycle policy to move files to Infrequent Access (IA) after 30 days.
- Upload test files and verify storage class transitions.
- Write a Linux script that backs up /home/ec2-user directory to /mnt/efs/backup.
- Schedule the script with a cron job for daily backup.
- Use the df -h command to check available space on the mounted EFS.
- Test file locking by opening the same file on two different EC2 instances.
- Set Linux permissions so that one user can write but another can only read.
- Change ownership of a folder in EFS using chown.
- Enable provisioned throughput for EFS and test performance.
- Test file read/write speeds using dd command on EFS.
- Create multiple directories inside EFS to organize logs, backups, and data.
- Sync files from local Linux folder to EFS using rsync.
- Check CloudWatch Burst Credit Balance metric for EFS.
- Write a short note on cost optimization when using EFS.
Advanced Questions
- Create an EFS file system with Access Points + encryption enabled.
- Mount the EFS on three Linux EC2 instances in different AZs.
- Test real-time file sharing across the three instances.
- Write a shell script that archives old logs (/var/log) into EFS daily.
- Write a script that compresses files in EFS older than 7 days.
- Create lifecycle rules to move archived files into IA storage class.
- Configure CloudWatch alarm if EFS throughput exceeds a set threshold.
- Automate EFS mount process by editing /etc/fstab.
- Perform a failure simulation: stop one instance and verify files remain accessible on others.
- Final Hands-on Project:
- Create an encrypted EFS with Access Points
- Mount on multiple Linux EC2s
- Organize directories for logs, backups, and user data
- Automate backups with cron jobs
- Enable lifecycle policy for IA
- Monitor usage in CloudWatch