use case of s3 cp command. Does it change storage class

0

Hello,

What is the use cases of this command. Does it change the storage class. I want to change all my s3 objects from intelligent tiering to standard.

aws s3 cp s3://YOUR_BUCKET_NAME/ s3://YOUR_BUCKET_NAME/ --recursive --storage-class STANDARD

Thanks, Ragav

asked 24 days ago190 views
1 Answer
0

Hi

When you execute the command aws s3 cp s3://YOUR_BUCKET_NAME/ s3://YOUR_BUCKET_NAME/ --recursive --storage-class STANDARD, it essentially creates new copies of all objects in your bucket within the same bucket itself.

List Information of the Bucket:

aws s3 ls s3://YOUR_BUCKET_NAME/ --recursive --human-readable ** Use AWS Copy Object:**

aws s3 copy-object \ --source-bucket YOUR_BUCKET_NAME \ --source-key <object_key> \ --destination-bucket YOUR_BUCKET_NAME \ --destination-key <object_key> \ --storage-class STANDARD

Reference: https://medium.com/@nikhil.nagarajappa/copying-aws-s3-objects-of-specific-storage-class-to-another-s3-bucket-874ed8345fea

profile picture
EXPERT
GK
answered 24 days ago
  • then what is the way to revert back to standard

  • Corrected my answer

  • How to use lifecycle policy in this case. Could you please explain in detail?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions