DEV Community

GargeeBhatnagar for AWS Community Builders

Posted on

Validation of S3 Bucket Features and Objects Using AWS CloudShell

“ 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
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

Image description

Image description

Image description

Image description

Image description

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

Image description

  1. 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

Image description

Image description

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. To learn more, read the AWS CloudShell documentation.

Thanks for reading!

Connect with me: Linkedin
Image description

Top comments (3)

Collapse
 
animeshsri98 profile image
Animesh Srivastava

A simple and interesting example to get introduced to S3 buckets and their validation through the Cloudshell.

Collapse
 
souravvasisth01 profile image
sourav-vasisth01

thanks, it's very helpful but is there any cost effect for using the s3api call ?

Collapse
 
bhatnagargargee profile image
GargeeBhatnagar

ThankYou for reading the blog 😀
No, It will not be any effect on cost using aws s3api call..