Policy access public S3

0

I can create a policy so that the elements I upload one by one to an s3 are always public

1개 답변
1

To create an S3 bucket policy that makes all objects uploaded to the bucket publicly accessible, you can define a policy that grants read permissions to everyone (*). Below is an example policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::your-bucket-name/*"
        }
    ]
}

Replace "your-bucket-name" with the name of your S3 bucket. This policy allows anyone (the * symbol in the "Principal") to retrieve (GetObject) any object (*) within the specified bucket.

**To apply this policy: **

  1. Open the Amazon S3 console.
  2. Select your bucket.
  3. Go to the "Permissions" tab.
  4. Click "Bucket Policy".
  5. Paste the policy JSON into the policy editor.
  6. Click "Save".
Nafiu
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠