Configure root login bucket for an s3 user?

0

I want to configure a policy/permission for a specific s3 user so they will login to a particular sub folder under a bucket.

I've got a bucket location here: s3://foo.s3.amazonaws.com and underneath is a sub-folder called: 'error' which I want the user to login to by default. So the full path would be: s3://foo.s3.amazonaws.com/error/

Is there way for me to configure a a policy/permission so I can have the specific user login into the "error" sub folder?

Kevin

Posted 2017-03-09T00:49:18.817

Reputation: 261

Answers

0

You could create a policy and associate it with that user.

`

{ "Version":"2012-10-17", "Statement": [ { "Sid": "AllowUserToSeeBucketListInTheConsole", "Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"], "Effect": "Allow", "Resource": ["arn:aws:s3:::*"] }, { "Sid": "AllowRootAndHomeListingOfCompanyBucket", "Action": ["s3:ListBucket"], "Effect": "Allow", "Resource": ["arn:aws:s3:::foo"], "Condition":{"StringEquals":{"s3:prefix":["","error/"],"s3:delimiter":["/"]}} }, { "Sid": "AllowListingOfUserFolder", "Action": ["s3:ListBucket"], "Effect": "Allow", "Resource": ["arn:aws:s3:::foo"], "Condition":{"StringLike":{"s3:prefix":["error/*"]}} }, { "Sid": "AllowAllS3ActionsInUserFolder", "Effect": "Allow", "Action": ["s3:*"], "Resource": ["arn:aws:s3:::foo/error/*"] } ] }

Check this blog post for more details.

Algeriassic

Posted 2017-03-09T00:49:18.817

Reputation: 723