S3 recursive Copy
The aws s3 cp recursive command makes your task easier when you’re about to copy files or entire directories between your local machine and S3 buckets. Here’s the basic syntax
aws s3 cp <SOURCE_PATH> <DESTINATION_PATH> --recursive --profile <myprofile>
- –recursive: This flag enables recursive copying, meaning it copies all files and sub-directories within the source path.
- SOURCE_PATH: The location of the file or directory on your local machine, or s3 object path
- DESTINATION_PATH: The path to the S3 bucket and object key (file name) within the bucket where you want to copy the data, (you can mention your local path as well)
Note: As both source_path and Destination path accepts both local path, & s3 path, you should make sure you use it appropriately, as giving both the values as local paths is meaning less.
Sample Command:
aws s3 cp <local-dir-path> s3://my-bucket/my-path/ --recursive --profile <profile-name>
AWS S3 CP Recursive
Amazon Web Services (AWS) is a comprehensive cloud computing platform offering many services, including storage, computing, databases, and more. Amazon S3 (Simple Storage Service) is a scalable object storage service from AWS. S3 provides a highly durable and cost-effective platform for storing various data types, including documents, images, videos, backups, and archives. S3 has different pricing models based on the frequency of accessing those objects. You can access your S3 data from anywhere with an internet connection, making it ideal for various cloud-based applications.