Agentic GCP-to-AWS code migration service with live UI
Project description
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 syncor pip fallback). - Can launch the migrated service via
startup_commandand 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
- Install dependencies (already managed by uv):
uv sync
- (Optional) enable OpenAI rewrite mode:
copy .env.example .env
# add OPENAI_API_KEY in .env
- Run app:
uv run python main.py
- 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, defaultmain)gcp_architecture(json object)aws_architecture_yaml(string, optional)validation_command(string, defaultuv run tests.py)max_fix_iterations(int, default8, max8)install_command(string, defaultauto)startup_command(string, defaultuv run main.py)ensure_service_running(bool, defaulttrue)create_env_file(bool, defaulttrue)env_overrides(object, optional)
- body:
GET /api/runs/{run_id}GET /api/runs/{run_id}/logsGET /api/runs/{run_id}/stream(SSE)GET /api/runs/{run_id}/files(shows cloned repo file list)
Notes
- If
OPENAI_API_KEYis missing, app uses deterministic rule-based rewrites. - Repositories are cloned into
workspaces/<run_id>/. - If
startup_commandis set, process logs are written toworkspaces/<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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gcp_aws_migrator-0.1.1.tar.gz
(20.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gcp_aws_migrator-0.1.1.tar.gz.
File metadata
- Download URL: gcp_aws_migrator-0.1.1.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf9927d7f9b3c55e80b3f06765f7bcc27d7161e0617f9f7ab20ecedcc8c07b4d
|
|
| MD5 |
33dd920f36689da33e2cbad0f4ab843d
|
|
| BLAKE2b-256 |
d3d4387d2e97a0cb701cac3d2d060ac0f3099357c71048355cc4318ccb1f9820
|
File details
Details for the file gcp_aws_migrator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: gcp_aws_migrator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f41b25d77a3d4d3ce513f01ef3c201209a7218bf3ec3faae82314c1113a29f1
|
|
| MD5 |
d43ec33d9492c75ad984956b74096736
|
|
| BLAKE2b-256 |
a570afd77e18d34aa35f1c436957cacb15b0782b987bad8db056917f929a657e
|