# Single file upload
$ aws s3 cp local-file.txt s3://bucket/path/
Upload a single file
Ubuntu
$ aws s3 cp
/var/www/mainweb.com/public/upload/logo.png
s3://u18-evolute-library/upload/
Windows
$ aws s3 cp
"C:\Users\akashkumar\Downloads\images\logo.png"
s3://u18-evolute-library/upload/
# Recursive upload (Upload All Files)
$ aws s3 cp /var/www/mainweb.com/public/upload/
s3://u18-evolute-library/upload/ --recursive
$ aws s3 cp "C:\Users\akashkumar\Downloads\images"
s3://u18-evolute-library/upload/ --recursive
Upload folder recursively
# Recursive upload with public access
$ aws s3 cp
/var/www/mainweb.com/public/upload/
s3://u18-evolute-library/upload/
--recursive --acl public-read
Upload folder recursively with public read access
# Make single file public read access
$ aws s3api put-object-acl --bucket my-bucket --key
path/file.txt --acl public-read
Make single file public read access
# Download file
$ aws s3 cp s3://u18-evolute-library/upload/logo.png
local-file.txt
Download a file from S3
# Upload specific file types
$ aws s3 cp
/var/www/mainweb.com/public/upload/
s3://u18-evolute-library/upload/
--recursive --exclude "*" --include "*.jpg" --include
"*.png" --include "*.mp4"
# Delete file
$ aws s3 rm s3://u18-evolute-library/upload/logo.png
Delete a specific file