AWS S3 Bucket Creation and Management

AWS S3 Bucket Creation and Management

AWS S3 Bucket

Amazon S3, also known as Simple Storage Service, stands out as an object storage solution renowned for its exceptional scalability, robust data availability, top-notch security features, and high-performance capabilities. This versatile service finds application in diverse scenarios, including storing and retrieving data, hosting static websites, and more.

Within this assignment, you will acquire the skills to generate and oversee S3 buckets within the Amazon Web Services (AWS) environment.

Task

  • Create an S3 bucket using Terraform.

  • Configure the bucket to allow public read access.

  • Enable versioning on the S3 bucket.

Solution

Step 1: Create S3 bucket using terraform. Will write below terraform script for the same. and trigger the script with terraform init and apply command.

We can verify previously step created bucket in AWS console.

Step 2: Configure the bucket to allow public read access.

In this Terraform configuration:

The aws_s3_bucket_public_access_block resource manages the control of public access to the S3 bucket named "terraform-s3-bucket-14012024" It explicitly permits public Access Control Lists (ACLs), public policies, and public bucket access.

The aws_s3_bucket_acl resource establishes an Access Control List (ACL) for the "terraform-s3-bucket-14012024" S3 bucket, configuring it as "public-read." This configuration provides public read access to the objects stored within the bucket.

Step-02: Navigate to the AWS S3 bucket, access the Permissions section, and activate ACLs by adjusting object permissions.

Note: This step is essential to prevent encountering an access denied error.

Execute the terraform script.

Verify the S3 bucket access in AWS console.

Step 3: Enable versioning on the S3 bucket.

Thanks for reading.

Thanks,

Kishor Chavan