This repository contains the code and documentation for an AWS S3 experiment.
The experiment involved using an AWS Academy account to perform various tasks related to AWS S3. The tasks included creating an HTML file with profile information, using the AWS SDK for Java to create an S3 bucket, uploading the HTML file to the S3 bucket, enabling hosting for the bucket, changing the bucket's policy for hosting the static webpage, deleting the file from the bucket, and deleting the bucket itself.
To run the experiment, follow the steps below:
-
Create an HTML file named
index.html
with the profile information, including the full name, banner number, email, and a declaration of original work. -
Open the
Main.java
file in your preferred Java IDE or text editor. -
Locate the
createS3Client
function. This function creates an instance of the S3Client using the AWS SDK for Java and the default credentials provider. -
Modify the
bucketName
variable in themain
function to specify the desired name for your S3 bucket. -
Compile and run the program.
-
Enter the desired operation number when prompted:
- Operation 1: Creates an S3 bucket with the specified bucket name.
- Operation 2: Uploads the
index.html
file to the S3 bucket. - Operation 3: Deletes the
index.html
file from the S3 bucket. - Operation 4: Deletes the S3 bucket.
-
The program will execute the selected operation and display a success message.
Feel free to modify and adapt this README file to meet the specific requirements of your assignment.