Skip to main content

Glacier Vault

πŸ“¦ Overview​

This Terraform module provisions an Amazon S3 Glacier Vault for long-term, low-cost archival storage.

It’s ideal for backup archives, compliance storage, and datasets that do not require frequent access but must remain durably stored over time.


βœ… Key Features​

  • Creates a secure S3 Glacier Vault for cold data storage
  • Supports tagging by environment, name, and purpose
  • Compliant with backup and archival retention policies
  • Optimized for durability and rare-access workloads

πŸ’Ό Use Cases​

  • Regulatory compliance data retention (HIPAA, SEC, IRS, etc.)
  • Archived application or database backups
  • Long-term media storage, legal hold, or audit logs
  • Secure, cost-effective offloading of cold datasets

πŸ“₯ Input Variables​

NameTypeDescription
regionstringAWS region to create the Glacier vault
vault_namestringName to assign to the Glacier vault
environmentstringTag to specify the deployment environment (e.g., dev, staging, prod)

πŸ“€ Outputs​

NameDescription
vault_nameThe name of the Glacier vault
vault_arnThe ARN of the created Glacier vault
regionThe AWS region where the vault was created

πŸš€ Deployment Readiness​

  • βœ… Compatible with Terraform 1.0+
  • βœ… Tested with AWS provider 5.x
  • πŸ§ͺ Requires IAM permissions for Glacier and tagging APIs

πŸ› οΈ Example Usage​

module "glacier_vault" {
source = "git::ssh://git@github.com/archiphire/aws-level-1-modules.git//storage/glacier-vault?ref=v1.0.0"

region = "us-east-1"
vault_name = "archiphire-archive"
environment = "prod"
}
terraform init
terraform plan
terraform apply

or

tofu init
tofu plan
tofu apply

🧹 Cleanup Options​

Terraform Destroy (for test environments):

terraform destroy

or

tofu destroy

Manual Deletion (CLI):

aws glacier delete-vault --account-id - --vault-name archiphire-archive

⚠️ Glacier vaults must be empty before deletion. Use the AWS CLI or SDK to remove archives if needed.

πŸ›‘οΈ Notes​

This Level 1 module is best suited for standalone cold storage use. For lifecycle automation or retrieval orchestration, compose it with:

s3-lifecycle-to-glacier glacier-job-retrieval (Level 2 concept)

πŸ”’ Deployment Package Notice​

This module is part of the Level 1 AWS License Tier. To access the full deployment package and source code, subscribe to Archiphire.