Reputation: 41
I have created a bucket, added a policy for full acess to a brand new IAM user and tried to mount the bucket as my archive folder on my server. It just doesn't go. I am on a special cloud and the only downfall of my hosting company that the storage is small. S3 mounted archive storage sounds like the idea.
But when i tried and followed all available policies, s3fs fails to access bucket. I know it's me, i just don't know how.
[root@backoffice s3fs-1.74]# s3fs -f -d -d -o use_cache=/tmp mybucketname /opt/bigarchive set_moutpoint_attribute(3291): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40777) FUSE library version: 2.9.3 nullpath_ok: 0 nopath: 0 utime_omit_ok: 0 unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.13 flags=0x0000b07b max_readahead=0x00020000 s3fs_init(2595): init s3fs_check_service(2894): check services. CheckBucket(2228): check a bucket. RequestPerform(1467): connecting to URL http://mybucketname.s3.amazonaws.com/ RequestPerform(1595): ### CURLE_HTTP_RETURNED_ERROR RequestPerform(1600): HTTP response code =403 s3fs: Failed to access bucket.
My Bucket policy is:
{ "Version": "2012-10-17", "Id": "mybucketnameS3PolicyId", "Statement": [ { "Sid": "IPAllow", "Effect": "Allow", "Principal": "*", "Action": "s3:*", "Resource": "arn:aws:s3:::mybucketname /*", "Condition": { "IpAddress": { "aws:SourceIp": "MY.PUBLIC.IP.ADDRESS" } } } ] }
My IAM policy is:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1423176468000", "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "arn:aws:s3:::mybucketname/*", "arn:aws:s3:::mybucketname" ] } ] }
S3fs is installed:
[root@backoffice s3fs-1.74]# s3fs --version Amazon Simple Storage Service File System 1.74 Copyright (C) 2010 Randy Rizun License GPL2: GNU GPL version 2 This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Fuse as well:
[root@backoffice s3fs-1.74]# pkg-config --modversion fuse 2.9.3
Upvotes: 1
Views: 3702
Reputation: 3717
Your action should be
"Action": "s3:*"
Also ensure that your IP address is the IP address that S3 would see (i.e. external IP address)
Upvotes: 0