I am trying to upload a pkl file located in the S3 bucket to EFS. I used as reference the Mounting on Amazon EC2 Linux instances using the EFS mount helper. I am using the cloud9 environment, the commands I used were the following:
ec2-user:~/environment $ sudo mkdir efs
ec2-user:~/environment $ sudo mount -t efs -o tls fs-yyyyyyyyyyyyy:/ efs
mount: /home/ec2-user/environment/efs: unknown filesystem type 'efs'.
ec2-user:~/environment $ ll
total 4
drwxr-xr-x 2 root root 6 Feb 13 19:19 efs
-rw-r--r-- 1 ec2-user ec2-user 569 Feb 9 11:28 README.md
ec2-user:~/environment $ ll efs
total 0
ec2-user:~/environment $ sudo mount -t efs -o tls,accesspoint=fsap-xxxxxxxxxxxxxx fs-yyyyyyyyyyyyy:/ efs
mount: /home/ec2-user/environment/efs: unknown filesystem type 'efs'.
But when I went to upload the file using aws s3 cp s3://mybucket-models/linear_model.zip .
, I got the following response:
download failed: s3://mybucket-models/linear_model.zip to ./linear_model.zip [Errno 13] Permission denied: u'/home/ec2-user/environment/efs/linear_model.zip.19Ea2cF8'
To solve this I have attached the following permissions to my bucket:
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:DeleteObject",
"s3:GetBucketLocation",
"s3:GetObject",
"s3:ListBucket",
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::mybucket-models",
"arn:aws:s3:::mybucket-models/*"
]
}
]
}
But I still get the same error, is there any way to check if I have mounted the EFS correctly?
I expecting to learn to use S3 Bucket and EFS.