Difference between revisions of "S3 read-write access to a certain bucket"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
  
 
Read and write permissions:
 
Read and write permissions:
<pre>
+
 
{
+
{
 
   "Version":"2012-10-17",
 
   "Version":"2012-10-17",
 
   "Statement":[
 
   "Statement":[
Line 9: Line 9:
 
         "Effect":"Allow",
 
         "Effect":"Allow",
 
         "Action":[
 
         "Action":[
             "s3:ListBucket"
+
             "[[s3:]]ListBucket"
 
         ],
 
         ],
 
         "Resource":"arn:aws:s3:::DOC-EXAMPLE-BUCKET"
 
         "Resource":"arn:aws:s3:::DOC-EXAMPLE-BUCKET"
Line 22: Line 22:
 
       }
 
       }
 
   ]
 
   ]
}
+
}
</pre>
 
  
 
== Read only ==
 
== Read only ==

Revision as of 08:58, 24 July 2023

https://aws.amazon.com/premiumsupport/knowledge-center/s3-console-access-certain-bucket/

Read and write permissions:

{
  "Version":"2012-10-17",
  "Statement":[
     {
        "Effect":"Allow",
        "Action":[
           "s3:ListBucket"
        ],
        "Resource":"arn:aws:s3:::DOC-EXAMPLE-BUCKET"
     },
     {
        "Effect":"Allow",
        "Action":[
           "s3:PutObject",
           "s3:GetObject"
        ],
        "Resource":"arn:aws:s3:::DOC-EXAMPLE-BUCKET/*"
     }
  ]
}

Read only

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListAllMyBuckets"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": "arn:aws:s3:::YourBucketName"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": "arn:aws:s3:::YourBucketName/*"
        }
    ]
}

Related

Errors

See also

Advertising: