![]() ![]() ~ aws s3 sync -storage-class "STANDARD_IA". AWS S3 is the object storage service provided by AWS. For example, if a user needs to store infrequently accessed files, they can use the -storage-class option to specify the STANDARD_IA class. Open the first file, click The syntax for AWS CLI is similar to s3cmd. This can be useful in situations where certain files require a different storage class than the default. The storage class option in the AWS CLI sync command allows users to specify a specific storage class when uploading files to S3. (dryrun) delete: s3://my-test-bucket/testfile1 This is a useful feature for testing and verifying your command before running it to ensure that it will perform the desired action. The -dryrun option in the AWS CLI sync command allows users to preview the operation that would be executed without actually running it. ![]() This is a useful feature for keeping the destination in sync with the source and ensuring that outdated files are removed. The delete option in the AWS CLI sync command is used to remove files that exist in the destination but not in the source. ![]() s3://my-test-bucket -exclude "*" -include ".png" -include ".jpg" Delete Option This allows users to include specific files or objects while excluding others based on specific patterns. In addition, the -exclude option can be used in combination with the -include option to fine-tune file selection. s3://my-test-bucket -exclude "mydirectory/large-file.tar" Include Option s3://my-test-bucket -exclude "*.jpg"Įxclude a single large file: ~ aws s3 sync. Users can also use the -exclude option multiple times to exclude multiple patterns. This option allows users to exclude files based on their file extension, file name, or path. The -exclude option in the AWS CLI sync command can be used to exclude files or objects from the sync based on specific patterns. ~ aws s3 sync s3://my-test-bucket s3://my-copy-test-bucket We will also discuss how to use a specific storage class when uploading files to S3. In this article, we will explore the various options available with the sync command, including the exclude and include options, the delete option, and the dry run option. This command can also be used to perform sync between S3 Buckets without the need to transit files on a local machine. The AWS CLI sync command is a powerful tool for copying new and updated files between a source and destination, with at least one of them being an S3 Bucket. ![]()
0 Comments
Leave a Reply. |