AWS Assignment– 5

EFS (Elastic File System) for Linux Learners

Basic Questions

  1. Create a new EFS file system using the AWS Console.
  2. Create an EFS file system using the AWS CLI.
  3. Launch a Linux EC2 instance in the same VPC as the EFS file system.
  4. Install NFS client utilities on your Linux instance.
  5. Create an EFS mount target in one Availability Zone.
  6. Mount the EFS file system to /mnt/efs on the EC2 instance.
  7. Create a text file inside /mnt/efs and verify persistence.
  8. Launch a second EC2 instance and mount the same EFS file system.
  9. Verify the file created on the first instance is visible on the second.
  10. Unmount the EFS file system using the umount command.
  11. Enable encryption at rest for your EFS file system.
  12. Mount the EFS with encryption in transit enabled.
  13. List all EFS file systems in your account using AWS CLI.
  14. List mount targets for a file system using AWS CLI.
  15. Restrict EFS access by modifying the Security Group to only allow NFS (2049).
  16. Test that an instance without SG access cannot mount the EFS.
  17. Configure IAM policy to restrict which users can mount EFS.
  18. Check CloudWatch metrics for your EFS file system.
  19. Create folders inside EFS and set different Linux permissions.
  20. Document in simple terms the difference between EFS, EBS, and S3.

Intermediate Questions

  1. Create an Access Point for your EFS file system.
  2. Mount the EFS using the Access Point from a Linux EC2 instance.
  3. Set a default POSIX user (UID/GID) in the Access Point and verify permissions.
  4. Create directories with different ownership inside EFS and test access.
  5. Enable General Purpose performance mode and test file access speed.
  6. Enable Max I/O performance mode and compare with General Purpose.
  7. Configure lifecycle policy to move files to Infrequent Access (IA) after 30 days.
  8. Upload test files and verify storage class transitions.
  9. Write a Linux script that backs up /home/ec2-user directory to /mnt/efs/backup.
  10. Schedule the script with a cron job for daily backup.
  11. Use the df -h command to check available space on the mounted EFS.
  12. Test file locking by opening the same file on two different EC2 instances.
  13. Set Linux permissions so that one user can write but another can only read.
  14. Change ownership of a folder in EFS using chown.
  15. Enable provisioned throughput for EFS and test performance.
  16. Test file read/write speeds using dd command on EFS.
  17. Create multiple directories inside EFS to organize logs, backups, and data.
  18. Sync files from local Linux folder to EFS using rsync.
  19. Check CloudWatch Burst Credit Balance metric for EFS.
  20. Write a short note on cost optimization when using EFS.

Advanced Questions

  1. Create an EFS file system with Access Points + encryption enabled.
  2. Mount the EFS on three Linux EC2 instances in different AZs.
  3. Test real-time file sharing across the three instances.
  4. Write a shell script that archives old logs (/var/log) into EFS daily.
  5. Write a script that compresses files in EFS older than 7 days.
  6. Create lifecycle rules to move archived files into IA storage class.
  7. Configure CloudWatch alarm if EFS throughput exceeds a set threshold.
  8. Automate EFS mount process by editing /etc/fstab.
  9. Perform a failure simulation: stop one instance and verify files remain accessible on others.
  10. 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