2

Is there a s3 policy rule that can only allow a user to upload so many GB of files? Basically looking to set a quota on the objects a user can upload.

Here is the rule set that I have now:

{
  "Version":"2012-10-17",
  "Statement": [
    {
      "Sid": "AllowUserBucketListInTheConsole",
      "Action": ["s3:*"],
      "Effect": "Allow",
      "Resource": ["arn:aws:s3:::customers"],
      "Condition":{"StringEquals":{"s3:prefix":["${aws:username}","${aws:username}/*","${aws:username}/"],"s3:delimiter":["/"]}}
    },
    {
      "Sid": "AllowUserBucketActions",
      "Action": ["s3:*"],
      "Effect": "Allow",
      "Resource": ["arn:aws:s3:::customers/${aws:username}","arn:aws:s3:::customers/${aws:username}/","arn:aws:s3:::customers/${aws:username}/*"]
    }
  ]
}

I found a policy such as the following, but it does not seem to work.

{
 "Statement": [
   {
     "Action": ["*" ],
     "Effect": "Limit",
     "Resource": "*",
     "Condition": { "NumericLessThanEquals":{"s3:quota-buckettotalsize": "45"}}
   }
 ]
}
1

No.

Unfortunately, of all the controls you can place on an S3 user, this is not one of them.

The policy you mentioned looks be for Eucalyptus Object Storage Gateway, which shares a lot in common with the AWS APIs but has some other options available.

Check these for further reference:

https://docs.eucalyptus.com/eucalyptus/4.4/iam-guide/access_policy_quota.html

https://docs.eucalyptus.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.