1. Create an S3 bucket
> aws s3 mb s3://rv398-20220712
> aws s3 mb s3://rv398-20220712
2. Copy EFS files to the S3 bucket
> aws s3 cp /mnt/efs/Joana3/Data s3://rv398-20220712/Data --recursive
> aws s3 cp /mnt/efs/Joana3/Data s3://rv398-20220712/Data --recursive
3. Change bucket lifecycle
> cat lifecycle.json
{
"Rules": [
{
"ID": "Move to Glacier (all objects in bucket)",
"Prefix": "",
"Status": "Enabled",
"Transition": {
"Days": 0,
"StorageClass": "GLACIER"
}
}
]
}
> aws s3api put-bucket-lifecycle --bucket rv398-20220712 \\
--lifecycle-configuration file://lifecycle.json
Note: It will take up to 24 hours for the file to be stored in Glacier
No comments:
Post a Comment