S3 read-write access to a certain bucket

From wikieduonline
Revision as of 08:58, 24 July 2023 by Welcome (talk | contribs)
Jump to navigation Jump to search

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: