From AWS CLI Here is the command to delete an s3 bucket where bucketname is the name of the bucket
Continue readingCategory: S3
How to determine the number of objects in an s3 bucket
You can find the number of objects in an S3 bucket by running the below command from AWS CLI where
Continue readingHow to create an S3 bucket from AWS CLI
Using high level s3 commands: aws s3 mb s3://bucketname Using S3 api commands: aws s3api create-bucket –bucket bucketname –region regionname
Continue readingHow to send a message to an SQS queue using Lambda when a file is uploaded to an S3 bucket
In this post I’ll show you how to send a message to an SQS queue when a new file is
Continue readingHow to allow public access to a folder in S3 bucket
To make a prefix of an S3 bucket publicly readable, add the below policy to the bucket. { “Version”:”2012-10-17″, “Statement”:
Continue readingHow to make an entire S3 bucket public
Add the below bucket policy to make the entire bucket publicly accessible.
Continue readingHow to list all S3 buckets and contents of a bucket
Below is the command to list all S3 buckets owned by you: aws s3 ls To list all the contents
Continue readingHow to rename folders and files in S3
To Rename a folder aws s3 –recursive mv s3://bucketname/prefix_old/ s3://bucketname/prefix_new/ To Rename a file aws s3 mv s3://bucketname/prefix/filename_old s3://bucketname/prefix/filename_new
Continue readingHow to copy files from one S3 bucket to another using wildcard
aws s3 cp s3://bucketname1/prefix1/prefix2/ s3://bucketname2/prefix/ –recursive –exclude “” –include “searchterm*”
Continue readingHow to search for files in S3 bucket folder using wildcard
aws s3 ls s3://bucketname/prefix1/prefix2/ | grep searchterm* | awk ‘{print $4}’
Continue reading