Validation of S3 Bucket Features and Objects Using AWS CloudShell
Tags: aws, awscloudshell, amazons3
Published: 2023-10-01 09:20:10

“ I have checked the documents of AWS to validate the s3 buckets features and objects. AWS cloudshell provides the solution to run the aws s3api commands and verify the buckets with features plus objects created. In terms of cost, there is no charge for aws cloudshell with this only need to pay the cost of services integrated with it.”

AWS CloudShell is a browser-based, pre-authenticated shell that you can launch directly from the AWS Management Console. You can navigate to CloudShell from the AWS Management Console a few different ways. You can run AWS CLI commands using your preferred shell, such as bash, powershell or z shell. And you can do this without downloading or installing command line tools.

In this post, you will experience the validation of s3 bucket features and objects using aws cloudshell. Here I have created s3 buckets with bucket versioning enabled, lifecycle rule enabled and objects in the bucket. 

#Architecture Overview
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1bkdm38utt9oeqbaau5.jpg)
The architecture diagram shows the overall deployment architecture with data flow, aws cloudshell and amazon s3 buckets.

#Solution overview
The blog post consists of the following phases:
1. Create of Amazon S3 Bucket with Bucket Versioning and Lifecycle Rule Enabled
2. Testing of S3 Bucket Versioning Enabled, Lifecycle Rule Enabled and Calculate of Total Bucket Size Using AWS S3 Commands

##Phase 1: Create of Amazon S3 Bucket with Bucket Versioning and Lifecycle Rule Enabled 
1. Open the console of S3, create a bucket named “t1-buck and t2-buck” with bucket versioning and lifecycle rule options enabled.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yv9khba8svy4cz77a3yv.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/empmp3ubr9y5rfwd03hu.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5sjlq255ltwyxwy0mw9.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3mrbvmvsx1b7u9rls7aq.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ts4h3ip9vhf9r9zuoin8.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sa8pv358j6afo8gprplo.png)

##Phase 2: Testing of S3 Bucket Versioning Enabled, Lifecycle Rule Enabled and Calculate of Total Bucket Size Using AWS S3 Commands
1. Open the cloudshell console, run the aws s3api command to verify the bucket versioning and lifecycle rule enabled from cli prompt.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2vbbf9l2mn3q0kwdjumn.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ibirymk19a15mlm9rlfd.png)

2. Open the s3 bucket created and upload the objects in the bucket. Also check the size of uploaded files using aws s3 command.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/trwnu1yhy8v72ui30hty.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ipdgzvumhn9t0zeov1un.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tq922fm3lo7s9nexmguo.png)

#Clean-up
Delete of S3 buckets.

#Pricing
I review the pricing and estimated cost of this example. 

Cost of Amazon S3 = $0.25

Cost of AWS CloudShell (No charge for cloudshell) = $0.0

Total Cost = $0.25

#Summary
In this post, I showed “how to do validation of s3 bucket features and objects using aws cloudshell”.

For more details on AWS CloudShell, Checkout Get started AWS CloudShell, open the [AWS CloudShell console](https://us-east-1.console.aws.amazon.com/cloudshell/home?region=us-east-1). To learn more, read the [AWS CloudShell documentation](https://docs.aws.amazon.com/cloudshell/?icmpid=docs_homepage_devtools).

Thanks for reading!

Connect with me: [Linkedin](https://www.linkedin.com/in/gargee-bhatnagar-6b7223114)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/38sdi4nsp89fnui8h7dk.png)