I was trying to copy all the files from my S3 bucket to a local folder in VM and I am getting the following error:
warning: Skipping file s3://bucket/object. Object is of storage class GLACIER.
Unable to perform download operations on GLACIER objects. You must restore the
object to be able to perform the operation. See aws s3 download help for
additional parameter options to ignore or force these transfers.
To copy files from my S3 bucket to local folder I used the following command:
aws s3 cp s3://${s3Location} ${localDumpPath}
Where:
${s3Location}
= my s3 location and${localDumpPath}
= my localfolder pathWhat do I need to change to be able to copy successfully?
I fixed the issue by using the following command:
aws s3 cp s3://${s3Location} ${localDumpPath} --storage-class STANDARD --recursive --force-glacier-transfer
You can also refer the below link to get details of how to restore an S3 object from the Amazon S3 Glacier storage class using the AWS CLI: Restore S3 object from the Amazon Glacier storage class