Create new bucket

aws s3 mb s3://<your_bucket_name> --region <region_name>

Remove Existing Buckets

aws s3 rb s3://<your_bucket_name> --force

List Command

aws s3 ls s3://<your_bucket_name> --recursive

Copy from Local to S3 Bucket

aws s3 cp /<local_path>/ s3://<your_bucket_name> --recursive

Copy from S3 Bucket to Local

aws s3 cp s3://<your_bucket_name>/ /<local_path>/ --recursive

Remove File from Bucket

aws s3 rm s3://<your_bucket_name>/<target_location> --recursive

Generate Presigned URL for Files

aws s3 presign s3://<your_bucket_name>/<file_name> --expires-in 60

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.