# create bucket
mc mb ALIAS/BUCKETNAME
# create user
mc admin user add ALIAS USERNAME SECRET-KEY
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:ListBucket",
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::BUCKETNAME/*",
"arn:aws:s3:::BUCKETNAME"
],
"Sid": "BucketAccessForUser"
}
]
}
#TODO: check this action
- ListBucketMultipartUploads
# create policy
mc admin policy create ALIAS POLICYNAME /tmp/POLICYNAME.json
# attach policy
mc admin policy attach ALIAS POLICYNAME --user USERNAME
mc admin policy attach ALIAS POLICYNAME --group GROUPNAME
# verify
mc admin user info ALIAS USERNAME
mc admin group info ALIAS GROUPNAME