- Mais recentes
- Mais votos
- Mais comentários
Hello, yes you can achieve this but it can restore after a pre-defined period of time. we have to create a Lifecycle Rule for this.
Through console it is bit easier to choose options but,
If you want to create through CLI Reference : https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-lifecycle-configuration.html
Follow this steps:
- First write0 a JSON file to create a Lifecycle Rule
{
"Rules": [
{
"ID": "TransitionGlacierToStandard",
"Prefix": "archives/",
"Status": "Enabled",
"Transitions": [
{
"Days": 30,
"StorageClass": "STANDARD"
}
]
}
]
}
- Make sure to change the configuration terms according to your terms (ID - unique identifier for your Rule, Prefix - Prefix for objects to apply rule, Status - Enabled or Disabled, Transition - Specific time period).
- After that save the file.
- Use this command in CLI **"aws s3api put-bucket-lifecycle-configuration --bucket your-bucket-name --lifecycle-configuration file://lifecycle-rule.json " ** Note : Make changes of Your Bucket name and JSON file name and its path.
Hello,
Yes, you would need to restore the objects from the Glacier storage class before you can make any changes to them.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html#sc-glacier
- S3 Glacier Flexible Retrieval and S3 Glacier Deep Archive objects are not available for real-time access. You must first restore S3 Glacier Flexible Retrieval and S3 Glacier Deep Archive objects before you can access them.
If you have large number of objects, yes, I recommend using S3 batch operations.
Hi
The command aws s3 sync s3://source-bucket/img.jpeg s3://destination-bucket doesn't work for transferring a Glacier object because S3 Glacier objects are archived data and not readily available for retrieval. They are meant for long-term, low-cost storage.
- Glacier Object Accessibility: S3 Glacier objects are in a special storage class designed for low-cost archiving. This means they aren't immediately accessible for retrieval like standard S3 objects.
- aws s3 sync Behavior: The sync command works by comparing the source and destination and copying objects that are missing or have changed. However, in this case, the sync command can't "see" the Glacier object because it's not readily available.
- You need to restore it https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
https://repost.aws/knowledge-center/s3-batch-operation-initiate-restore
Conteúdo relevante
- AWS OFICIALAtualizada há 10 meses
- AWS OFICIALAtualizada há 2 anos
Hi Mahaboob Basha, so after X number of days once the objects will be transitioned to STANDARD from GLACIER then we can copy the objects from source bucket to destination bucket, right?