Skip to Content
Hybrid Cloud for Developers
book

Hybrid Cloud for Developers

by Manoj Hirway
April 2018
Intermediate to advanced content levelIntermediate to advanced
280 pages
8h 37m
English
Packt Publishing
Content preview from Hybrid Cloud for Developers

Using the AWS command-line interface

AWS provides a CLI for manipulating files on the S3 bucket. A simple command to copy from a S3 bucket to a local directory is as follows:

[ec2-user ~] # aws s3 cp s3://<bucketname>/<path to file>/<filename>     myfile.txt 

The AWS cp command is very similar to the Linux cp command, which requires the source and destination paths of the file to be copied.

Similarly, you can use the following command to copy a file back from a local directory to the S3 bucket:

[ec2-user ~] # aws s3 cp  myfile.txt  s3://<bucketname>/<path to file>/myfile.txt

You can also use the sync command to continuously sync the contents of the local directory and S3 bucket:

[ec2-user ~] # aws s3 sync s3://<bucket>/<path> <local directory> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hybrid Cloud for Architects

Hybrid Cloud for Architects

Alok Shrivastwa
OpenStack: Building a Cloud Environment

OpenStack: Building a Cloud Environment

Alok Shrivastwa, Sunil Sarat, Kevin Jackson, Cody Bunch, Egle Sigler, Tony Campbell

Publisher Resources

ISBN: 9781788830874Supplemental Content