- Newest
- Most votes
- Most comments
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
Your command is for changing the storage class of all objects in an S3 bucket from Intelligent Tiering to Standard storage class. to breakdown of the command -
-
aws s3 cp s3://YOUR_BUCKET_NAME/ s3://YOUR_BUCKET_NAME/ --recursive --storage-class STANDARD This command will copy all objects from the specified S3 bucket to the same bucket, but with the storage class set to STANDARD The “—recursive” flag ensures that the command applies to all objects within the bucket, including those in subdirectories. The “--storage-class STANDARD” option sets the storage class of the copied objects to the Standard storage class.
-
Changing the storage class of objects does not change the underlying data or the object's location. It only modifies the storage class that determines the pricing and retrieval characteristics of the object.
-
Transitioning objects from Intelligent Tiering to Standard storage class can be useful if you determine that your data access patterns no longer require the automatic tiering capabilities of Intelligent Tiering, and you want to optimize for lower storage costs.
-
Please note that there may be data transfer and retrieval charges associated with this operation, depending on your specific AWS usage and pricing model. Review the latest AWS S3 pricing documentation for the most current information on storage class transition costs.
-
Lastly, you can also use S3 Lifecycle policies to automatically transition objects between storage classes, without the need to manually run the “aws s3 cp” command. This can be a more scalable and automated approach to managing your S3 storage class transitions.
To use an S3 Lifecycle policy to transition objects from Intelligent Tiering to Standard storage class, follow below steps:
- Go to the AWS Management Console and navigate to the S3 service
- Select the bucket containing the objects you want to transition.
- Click on the "Management" tab and then "Add lifecycle rule".
- In the Lifecycle rule configuration, you can set the following:
- Rule name: Give the rule a descriptive name.
- Lifecycle rule scope: Choose to apply the rule to the entire bucket or a specific prefix.
- Transition actions: Under "Transition", select the "Intelligent-Tiering" storage class as the source and "Standard" as the destination storage class. You can also specify the number of days after which the transition should occur.
- Review and confirm the Lifecycle rule settings, and then save the rule.
Once the Lifecycle rule is in place, Amazon S3 will automatically transition the objects from Intelligent Tiering to Standard storage class based on the configured transition settings.
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year 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?