🪴 notes

Search

Search IconIcon to open search

aws s3 permissions

Published Jul 5, 2023 Last updated Aug 1, 2023 Edit Source

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::ecom-testt/images/*"
            ]
        }
    ]
}

Use the policy generator to create this configuration.

The resource name “ARN” should be available on the bucket policy edit page.

Then name can be thought of as a directory path. To specify a directory, modify the path to point to the directory. To apply the configuration for all s3 objects in the directory add /*.