Skip to content

Glacier

CloudMock emulates Amazon S3 Glacier, supporting vault management, archive operations, retrieval jobs, vault locks, and notifications.

OperationStatusNotes
CreateVaultSupportedCreates a vault
DescribeVaultSupportedReturns vault details
ListVaultsSupportedLists all vaults
DeleteVaultSupportedDeletes an empty vault
UploadArchiveSupportedUploads an archive to a vault
DeleteArchiveSupportedDeletes an archive
InitiateJobSupportedInitiates a retrieval or inventory job
DescribeJobSupportedReturns job details
ListJobsSupportedLists jobs for a vault
InitiateVaultLockSupportedInitiates a vault lock
CompleteVaultLockSupportedCompletes a vault lock
SetVaultNotificationsSupportedConfigures vault notifications
GetVaultNotificationsSupportedReturns vault notification config
import { GlacierClient, CreateVaultCommand, UploadArchiveCommand } from '@aws-sdk/client-glacier';
const client = new GlacierClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new CreateVaultCommand({ vaultName: 'my-vault', accountId: '-' }));
const { archiveId } = await client.send(new UploadArchiveCommand({
vaultName: 'my-vault',
accountId: '-',
body: Buffer.from('archive data'),
}));
console.log(archiveId);
import boto3
client = boto3.client('glacier',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.create_vault(vaultName='my-vault', accountId='-')
response = client.upload_archive(
vaultName='my-vault',
accountId='-',
body=b'archive data')
print(response['archiveId'])
cloudmock.yml
services:
glacier:
enabled: true
  • Archives are stored in-memory, not in cold storage
  • Retrieval jobs complete immediately rather than taking hours
  • Vault lock policy enforcement is simplified