Step 1 — Create the EFS File System

In the Amazon EFS console, click Create file system, name it (e.g. "kola-fs"), and select the target VPC. Review the recommended settings — Elastic throughput mode, lifecycle transitions to Infrequent Access and Archive, automatic backups, and encryption — then click Create file system.
Step 2 — Confirm File System Creation

A success banner confirms the file system ("kola-fs") is Available, showing its file system ID, encryption status, size, and creation time in the File systems list.
Step 3 — Launch an EC2 Instance

On the EC2 Launch an instance page, name the instance (e.g. "KOLA-SERVER"), select an Amazon Machine Image (Amazon Linux 2023), choose the instance type (t3.micro), and select or create a key pair (e.g. "EBS-KEY") for SSH access.
Step 4 — Configure Storage and Attach EFS

Under Configure storage, keep the default root volume settings. In the File systems section, select EFS as the file system type to attach to this instance.
Step 5 — Review the EFS Network and Mount Targets

On the EFS file system's detail page, check the Network tab to confirm mount targets are Available across each availability zone, along with their subnet IDs, IP addresses, and associated security groups — necessary for EC2 to connect.
Step 6 — Configure Network Settings for the Instance

Back in the EC2 launch wizard, under Network settings, confirm the VPC and subnet match the EFS file system's network, enable auto-assign public IP, and configure the security group to allow inbound SSH (port 22) traffic.
Step 7 — Set the File System and Mount Point

In the File systems configuration panel, select the EFS file system (kola-fs) and specify the mount point (e.g. /mnt/efs/fs1). Leave "Automatically create and attach security groups" and "Automatically mount shared file system" checked so EFS attaches on launch.
Step 8 — Launch the Instance

Review the configuration summary and click Launch instance to provision the EC2 server with the EFS file system attached.
Step 9 — Confirm Successful Launch

A success message confirms the instance launch, with a link to the new instance ID for further management.
Step 10 — Open the Instance Summary

On the instance details page, confirm the instance ("KOLA-SERVER") is Running, and note its public IPv4 address and public DNS. Click Connect to proceed to SSH connection setup.
Step 11 — Get the SSH Connection Command

Under the SSH client tab, follow the steps to locate your private key file, set correct permissions (chmod 400), and copy the example SSH command (e.g. ssh -i "EBS-KEY.pem" ec2-user@).
Step 12 — Connect and Verify the EFS Mount

In a local terminal (e.g. VS Code), run the SSH command to connect to the instance. Once connected, run df -T to confirm the EFS file system is mounted (visible as an nfs4 filesystem type under /mnt/efs/fs1), verifying the EC2 instance has successful shared storage access.
Top comments (0)