DEV Community

Dipali Kulshrestha
Dipali Kulshrestha

Posted on

S3 file system mount

Step 1 — Create an S3 Bucket
Step 2 — Create an IAM Role for EC2

Trusted entity type:
AWS service

Use case:
EC2

AmazonS3FullAccess
Enter fullscreen mode Exit fullscreen mode

Step 3 — Launch an EC2 Instance (attach above IAM role)

Step 4 — Verify IAM Access

aws s3 ls
Enter fullscreen mode Exit fullscreen mode

Step 5 — Install Mountpoint for Amazon S3

sudo dnf install mount-s3
Enter fullscreen mode Exit fullscreen mode

Step 6 — Create a Mount Directory

mkdir mountpoint
Enter fullscreen mode Exit fullscreen mode

Step 7 — Mount the Directory

mount-s3 <bucket> <dir>
Enter fullscreen mode Exit fullscreen mode

Step 9 — Read the File

cd dir

ls -la

cat <filename>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)