Files
flow/scripts/aws
zeekay 930ffbc5c5 refactor: /v1/ canonical paths (sweep)
Per global rule: /v1/ only, never /api/. Internal API calls + handler
comments + route registrations updated. External vendor APIs (OpenRouter,
LangWatch, etc.) left as-is.

- Backend: APIRouter prefix dropped from "/api" — router_v1 (prefix=/v1)
  and router_v2 (prefix=/v2) now mount at the root, subdomain (api.*)
  already namespaces.
- API_V1_STR: "/api/v1" → "/v1"
- Frontend constants: BASE_URL_API "/api/v1/" → "/v1/" and BASE_URL_API_V2
  "/api/v2/" → "/v2/"; vite proxy + Traefik routing labels updated.
- Source files (mcp_utils, mcp_projects, mcp, folders, vertex_types,
  load/utils, mcp_sse, schema/workflow): all internal URL builders.
- Tests + e2e specs + API-code-generator templates + AWS CDK behaviors
  updated to match.
2026-05-18 21:58:07 -07:00
..
2025-03-28 22:44:48 +00:00
2023-12-02 01:11:30 +00:00
2025-03-28 22:44:48 +00:00

Deploy Hanzoflow on AWS

Duration: 30 minutes

Introduction

In this tutorial, you will learn how to deploy hanzoflow on AWS using AWS Cloud Development Kit (CDK). This tutorial assumes you have an AWS account and basic knowledge of AWS.

The architecture of the application to be created: hanzoflow-archi Hanzoflow is deployed using AWS CDK. The application is distributed via Amazon CloudFront, which has two origins: the first is Amazon Simple Storage Service (S3) for serving a static website, and the second is an Application Load Balancer (ALB) for communicating with the backend. AWS Fargate, where FastAPI runs and Amazon Aurora, the database, are created behind the ALB. Fargate uses a Docker image stored in Amazon Elastic Container Registry (ECR). Aurora's secret is managed by AWS Secrets Manager.

How to set up your environment and deploy hanzoflow

  1. Open AWS CloudShell.
  2. Run the following commands in Cloudshell:
    git clone https://github.com/aws-samples/cloud9-setup-for-prototyping
    cd cloud9-setup-for-prototyping
    cat params.json | jq '.name |= "c9-for-hanzoflow"'
    ./bin/bootstrap
    
  3. When you see Done! in Cloudshell, open c9-for-hanzoflow from AWS Cloud9. make-cloud9
  4. Run the following command in the Cloud9 terminal.
    git clone https://github.com/hanzoai/flow.git
    cd hanzoflow/scripts/aws
    cp .env.example .env # Edit this file if you need environment settings
    npm ci
    cdk bootstrap
    cdk deploy
    
  5. Access the URL displayed.
    Outputs:
    HanzoflowAppStack.frontendURLXXXXXX = https://XXXXXXXXXXX.cloudfront.net
    
  6. Enter your user name and password to sign in. If you have not set a user name and password in your .env file, the user name will be set to admin and the password to 123456. signin-hanzoflow

Cleanup

  1. Run the following command in the Cloud9 terminal.
    bash delete-resources.sh
    
  2. Open AWS CloudFormation, select aws-cloud9-c9-for-hanzoflow-XXXX and delete it. delete-cfn s