2

I'm using the AWS CLI to use Amazon's S3 storage for backing up files:

aws s3 sync /backup-these-files s3://my-backup

How can I specify the x-amz-storage-class header, to tell it to put these files into the STANDARD-IA storage tier?

I can't figure the options with the AWS CLI to add a header or otherwise specify this option.

Reference: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-howtoset

Eric
  • 1,127
  • 3
  • 13
  • 24

1 Answers1

3

You can use --storage-class STANDARD_IA option.

--storage-class (string) The type of storage to use for the object. Valid choices are: STANDARD | REDUCED_REDUNDANCY | STANDARD_IA | ONEZONE_IA | INTELLIGENT_TIERING | GLACIER | DEEP_ARCHIVE. Defaults to 'STANDARD'

References

AWS S3 sync

kenlukas
  • 3,101
  • 2
  • 16
  • 26