not recommended. Use S3 for Glacier instead as it's easier, cheaper, and has more functionality
aws glacier list-vaults --account-id 123456789012aws glacier upload-archive --vault-name awsexamplevault --account-id 123456789012 --body archive.zipPermissionsBlock all public access under Block public access (bucket settings) is on, edit and switch to off Permissions tab edit Bucket Policy{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::<PUT_BUCKET_NAME_HERE>/*"
]
}
]
}
Properties tabaws s3 cp foo.txt s3://bucketname/foo.txt --storage-class DEEP_ARCHIVE
aws s3 cp folder s3://bucketname/foldername --storage-class DEEP_ARCHIVE --recursive
aws s3api restore-object --bucket sample2.txt --key sample.txt --restore-request '{"Days":5,"GlacierJobParameters":{"Tier":"Standard"}}' aws s3api head-object --bucket DOC-EXAMPLE-BUCKET --key dir1/example.objaws s3 cp s3://mybucket/test.txt test2.txt