Create S3 bucket

Create S3 bucket

  1. In the search bar, type S3 and select it from the results.

    • Select Bucket
    • Select General purpose buckets
    • Click on Create bucket S3 bucket S3 bucket
  2. In the Create bucket interface

    • Enter Bucket name. In this lab, we use aws-cicd-ec2- + random number of 4 digits (e.g. aws-cicd-ec2-3861)
    • Uncheck Block Public Access settings
    • You have to check I acknowledge that the current settings might result in this bucket and the objects within becoming public.
    • Click on Create bucket S3 bucket
  3. After creating the bucket successfully:

    • Select the bucket and select Permissions
    • Scroll down to Bucket policy and select Edit S3 bucket
  4. Fill in the policy content:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "ListObjectsInBucket",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::[YOUR_BUCKET_NAME]"
        },
        {
            "Sid": "AllObjectActions",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:*Object*",
            "Resource": "arn:aws:s3:::[YOUR_BUCKET_NAME]/*"
        }
    ]
}

S3 bucket

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

S3 bucket