I need to change storage class of a s3 object from STANDARD class into STANDARD_IA using s3cmd. Can anybody help me to do this task. Thanks in advance.
Using s3cmd:
s3cmd cp s3://BUCKET/KEY s3://BUCKET/KEY --storage-class=STANDARD_IA
Using AWS CLI:
aws s3 cp s3://BUCKET/KEY s3://BUCKET/KEY --storage-class STANDARD_IA
WARNING: If Versioning is on, this does not change the storage class of the object. It creates a new object with the requested storage class (e.g. STANDARD_IA), but keeps the original version in whatever storage class it was uploaded (e.g. STANDARD). You'll be paying for both copies.