Create S3 bucket

Create S3 bucket

  1. Prepare an S3 bucket to store build artifact

    • Go to S3 page
    • Select Bucket
    • Select Create bucket

S3 bucket

  1. In the Create bucket interface

    • Enter Bucket name
    • Select Region

S3 bucket

  1. Uncheck Block Public Access

S3 bucket

  1. Check again and select Create bucket

S3 bucket

  1. After creating the bucket successfully.

    • Select the bucket and select Permissions
    • Scroll down and select Edit Bucket policy.

S3 bucket

  1. Fill in the policy content.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "ListObjectsInBucket",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::aws-cicd-ec2"
        },
        {
            "Sid": "AllObjectActions",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:*Object*",
            "Resource": "arn:aws:s3:::aws-cicd-ec2/*"
        }
    ]
}

S3 bucket

  1. Then we will see that the S3 bucket is public.

S3 bucket