Install AWS CLI - https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
After installing configure AWS cli:
-
Ran command
aws configure
:- Add access key
- Add secret key
- Add region the region should be only
us-east-1
- 4th option "None"
-
Ran the S3 CLI commands like:
-
Using cp:
- This command copies files, but it's not designed for large-scale transfers.
- Example: aws s3 cp s3://source-bucket/file s3://destination-bucket/file.
-
Using mv:
- This command allows you to move files or directories from one S3 bucket to another.
- Example: aws s3 mv s3://source-bucket/path/to/file s3://destination-bucket/path/to/file.
-
Using sync:
- The sync command copies files from the source to the destination, ensuring that the destination bucket has the same files and directories as the source bucket, but without deleting files from the destination bucket that aren't in the source. - Example: aws s3 sync s3://source-bucket/ s3://destination-bucket/.
-