Skip to main content

GCP -> AWS Migration Agent (Hackathon MVP)

Python app that:

  • Accepts GCP architecture JSON.
  • Accepts optional target AWS YAML (or auto-generates one).
  • Clones a Python repo from Git.
  • Finds GCP SDK usage (Cloud SQL, Storage, Secret Manager patterns).
  • Rewrites matching files into AWS-oriented code via OpenAI (or fallback rule-based mode).
  • Runs a validation command after rewrite and iteratively attempts runtime repairs on error.
  • Installs dependencies inside the cloned repo (install_command=auto -> uv sync or pip fallback).
  • Can launch the migrated service via startup_command and keep it running in background.
  • Streams step-by-step logs to a frontend.

Stack

  • Backend: FastAPI
  • Frontend: static HTML + JS (served by FastAPI)
  • Package manager: uv
  • Git clone: GitPython
  • LLM: OpenAI with provider abstraction

Quick Start

  1. Install dependencies (already managed by uv):
uv sync
  1. (Optional) enable OpenAI rewrite mode:
copy .env.example .env
# add OPENAI_API_KEY in .env
  1. Run app:
uv run python main.py
  1. Open:
http://localhost:9000

Use As A Python Package

After publishing/installing:

from gcp_aws_migrator import launch_migration_ui

launch_migration_ui(
  repo_url="https://github.com/your-org/your-repo.git",
  branch="main",
  gcp_architecture={"services": ["storage", "secret_manager", "cloud_sql"]},
  auto_start=True,
  env_overrides={"AWS_DEFAULT_REGION": "eu-north-1"},
)

launch_migration_ui(...) supports pre-filling all UI fields and can auto-start the conversion.

Build And Publish

Build wheel + source dist:

uv build

Upload to PyPI using an API token:

set TWINE_USERNAME=__token__
set TWINE_PASSWORD=pypi-<your-token>
uvx twine upload dist/*

API

  • POST /api/migrate
    • body:
      • repo_url (string)
      • branch (string, default main)
      • gcp_architecture (json object)
      • aws_architecture_yaml (string, optional)
      • validation_command (string, default uv run tests.py)
      • max_fix_iterations (int, default 8, max 8)
      • install_command (string, default auto)
      • startup_command (string, default uv run main.py)
      • ensure_service_running (bool, default true)
      • create_env_file (bool, default true)
      • env_overrides (object, optional)
  • GET /api/runs/{run_id}
  • GET /api/runs/{run_id}/logs
  • GET /api/runs/{run_id}/stream (SSE)
    • GET /api/runs/{run_id}/files (shows cloned repo file list)

Notes

  • If OPENAI_API_KEY is missing, app uses deterministic rule-based rewrites.
  • Repositories are cloned into workspaces/<run_id>/.
  • If startup_command is set, process logs are written to workspaces/<run_id>/.migration/startup.log.
  • Validation and repair logs are streamed in real time so migration progress is traceable.
  • This is an MVP and does not enforce production-grade safety controls.

Metadata

Release files for gcp-aws-migrator 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gcp-aws-migrator 0.1.2
File Size Uploaded Provenance Actions
gcp_aws_migrator-0.1.2.tar.gz 20.8 kB Without provenance Details for gcp_aws_migrator-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gcp-aws-migrator 0.1.2
File Interpreter ABI Platform Actions
gcp_aws_migrator-0.1.2-py3-none-any.whl Python 3 none any Details for gcp_aws_migrator-0.1.2-py3-none-any.whl

Total release size: 46.3 kB

Release files / gcp_aws_migrator-0.1.2.tar.gz

Download URL gcp_aws_migrator-0.1.2.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d0017af798fdf2be32724f25fdac2a083eb8002e2aef998bd2ea28fbbf3a9034
BLAKE2b-256 checksum
How to use checksums
d5c8e648ba31b910734b499efad2411e9c081289ce80f52e3dbe44b744292e4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / gcp_aws_migrator-0.1.2-py3-none-any.whl

Download URL gcp_aws_migrator-0.1.2-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
796272f7331fd37086f8d05db7178114ae5540d1cf1e015a63a7ca73baf9b112
BLAKE2b-256 checksum
How to use checksums
599e22acdcd4e2018c473eab3329f5143b94fb0e55de19cd00cdb789a70c5529
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for gcp-aws-migrator 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page