how to copy s3 directory s local file code example
Example 1: copy folder from s3 to local
aws s3 cp s3://myBucket/dir localdir --recursive
Example 2: copy local files to s3
aws s3 cp <your directory path> s3://<your bucket name> --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --recursive