amazon web services - S3 bucket policy: allow full access to a bucket and all its objects -


i bucket policy allows access objects in bucket, , operations on bucket listing objects. (action s3:*.)

i able solve using 2 distinct resource names: 1 arn:aws:s3:::examplebucket/* , 1 arn:aws:s3:::examplebucket.

is there better way - there way specify resource identifier refers bucket , contained objects, in 1 shot?

permissions against bucket separate permissions against objects within bucket. therefore, must grant permissions both.

fortunately, can write shorter version combine bucket-level , object-level permissions:

{   "id": "bucketpolicy",   "version": "2012-10-17",   "statement": [     {       "sid": "allaccess",       "action": "s3:*",       "effect": "allow",       "resource": [          "arn:aws:s3:::my-bucket",          "arn:aws:s3:::my-bucket/*"       ],       "principal": "*"     }   ] } 

Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -