Create S3 Bucket

Create S3 Bucket

In this section, we will use CloudFormation to create resources for the lab. The CloudFormation stack will create service resources such as an EC2 instance, SNS Topic, and Lambda Function.

Step 1: Download Template

  1. First, download the template CloudFormation and Lambda Function.

Step 2: Create an S3 Bucket

  1. Create an S3 bucket to store the source data by following these steps:

    • Go to the AWS Management Console.
    • Find and select S3.

    AWS Backup

  2. In the S3 interface, select Create bucket.

    AWS Backup

  3. In the Create bucket interface:

    • Enter a Bucket name. It must be a unique name; you can choose any name you like.

    AWS Backup

    Note: In this workshop, we will use the Singapore region (ap-southeast-1). If you want to use another region, be sure to adjust the region when creating workshop-related resources.

  4. Preserve the configuration.

    AWS Backup

  5. Select Create bucket.

    AWS Backup

  6. Finish creating the S3 bucket.

    AWS Backup

  7. Create an archive folder.

    AWS Backup

  8. In the folder creation interface:

    • Enter the folder name.
    • Select Create folder.

    AWS Backup

  9. Finish creating the folder.

    AWS Backup

  10. In the newly created folder, upload the downloaded and unzipped files.

    AWS Backup

  11. In the Upload section:

    • Select Add files.
    • Choose the files you want to upload.
    • Select Upload.

    AWS Backup

  12. Finish uploading the files.

    AWS Backup

  13. Configure permissions for the S3 bucket:

    • For Block public access (bucket settings).

    AWS Backup

  14. Uncheck Block all public access and then select Save changes.

    AWS Backup

  15. Confirm and select Confirm.

    AWS Backup

  16. Configure the Bucket policy:

    • Select Edit.

    AWS Backup

  17. In the Edit bucket policy interface, enter the following code and replace Bucket-Name with your Bucket ARN.

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "PublicReadGetObject",
                "Effect": "Allow",
                "Principal": "*",
                "Action": [
                    "s3:GetObject"
                ],
                "Resources": [
                    "arn:aws:s3:::Bucket-Name/*"
                ]
            }
        ]
    }
    

    AWS Backup

  18. Select Save changes.

    AWS Backup

  19. Verify that the Public permissions are set.

    AWS Backup

  20. Copy the path information of lambda_function.zip.

    AWS Backup

  21. Copy the Object URL information of the file backup-lab.yaml.

    AWS Backup