如何更改S3存储桶中对象的存储类? [英] How to change storage class of object in s3 bucket?

查看:276
本文介绍了如何更改S3存储桶中对象的存储类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用s3cmd将s3对象的存储类从STANDARD类更改为STANDARD_IA.有人可以帮我做这个任务吗?预先感谢.

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.

推荐答案

使用s3cmd:

s3cmd cp s3://BUCKET/KEY s3://BUCKET/KEY --storage-class=STANDARD_IA

使用AWS CLI:

aws s3 cp s3://BUCKET/KEY s3://BUCKET/KEY --storage-class STANDARD_IA

警告::如果启用了版本控制",则不会更改对象的存储类.它将使用请求的存储类(例如STANDARD_IA)创建一个新对象,但将原始版本保留在上载的任何存储类中(例如STANDARD).您将为这两个副本付费.

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.

这篇关于如何更改S3存储桶中对象的存储类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆