Skip to content

RyanJarv/awsbak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

awsbak

NOTE: This project is not functional currently.

awsbak focuses on exporting an AWS account’s state—starting with CloudFormation stacks—into a compressed archive. The first milestone captures stack templates, parameters, outputs, and resource summaries so teams can rapidly audit or recreate their infrastructure. Exports can be written to local paths or S3 URIs, and the framework will grow to cover additional services after the CloudFormation workflow is solid.

Getting started

  1. Quick run (no installation): execute commands through uv run, e.g.:

    uv run awsbak --help
  2. For a persistent environment, create and activate a Python 3.10+ virtual environment and install the project:

    uv venv .venv
    source .venv/bin/activate
    uv pip install -e .
  3. Verify the tool is reachable:

    awsbak --help

awsbak export (CloudFormation-first)

The upcoming export subcommand initially targets CloudFormation data:

  • Enumerate all CloudFormation stacks in the target account/region.
  • Capture stack templates (JSON/YAML), parameters, outputs, and resource summaries.
  • Record a manifest describing stack relationships, last update times, and template locations.
  • Package the collected data into a compressed archive (zip by default, extensible to other formats).
  • Write the archive to either a local path (e.g. ./exports/account.zip) or an S3 URI (s3://my-bucket/exports/account.zip).

Once the CloudFormation workflow is solid, additional service collectors (EC2, Route 53, S3, ECR) will plug into the same pipeline.

Until the command lands, the CLI exposes scaffolding (awsbak export --help) and supporting modules that will orchestrate CloudFormation enumeration, serialization, and upload routines. Invoking the command today logs the chosen parameters so the interface can stabilise before the implementation is wired up.

awsbak export \
  --account 123456789012 \
  --region us-east-1 \
  ./out/cloudformation-export.zip

Optional: awsbak init

The init subcommand remains available to provision a hardened S3 bucket suited for low-cost, long-term storage. While exports can be written to any destination, running awsbak init ensures you have a secure bucket with versioning, lifecycle policies, and IAM tooling ready to receive generated archives.

awsbak init \
  --account 123456789012 \
  --region us-east-1 \
  --bucket-name my-backup-exports

Add --deploy to have the CLI create or update the CloudFormation stack automatically. This step is optional but recommended if you plan to store exports in S3 for disaster recovery or auditing.

Roadmap highlights

  • Phase 1: Define the export pipeline skeleton, manifest format, and storage abstraction; add automated tests around configuration and path handling.
  • Phase 2: Implement per-service collectors for EC2, Route 53, S3, and ECR, including data serialization into the archive.
  • Phase 3: Validate archive integrity, add optional restore helpers, and extend coverage to additional AWS services.

Refer to ROADMAP.md for the detailed task list and progress tracker.

For component-level details, see docs/architecture.md.

About

Export your AWS account (WIP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages