Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

copy file from local to s3 bucket aws cli

# Single File. --grants flag is optional
aws s3 cp file.txt s3://my-bucket/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers full=emailaddress=user@example.com
# Multiple Files from directory. --grants flag is optional
aws s3 cp <your directory path> s3://<your bucket name> --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --recursive
# setting exclude or include flags
aws s3 cp <your directory path> s3://<your bucket name>/ --recursive --exclude "*.jpg"  --include "*.log"
Source by qiita.com #
 
PREVIOUS NEXT
Tagged: #copy #file #local #bucket #aws #cli
ADD COMMENT
Topic
Name
2+8 =