How Do You Copy a File into an S3 Bucket using the AWS CLI?

Problem scenario
How do you copy a file from a Linux server with AWS CLI to an S3 bucket?

Draft a command like this but replace /tmp/good.txt with the path and name of the source file you are copying, and replace "foobar" with the name of the s3 bucket you are copying to (as the destination):

aws s3 cp /tmp/good.txt s3://foobar/

Run the command.

Leave a comment

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