mirror of
https://github.com/hanzoai/flow.git
synced 2026-10-17 01:29:18 +00:00
Cleaned the concurrent session's half-rebrand inconsistency (166 files): - pip/pypi refs hanzoflow -> hanzo-flow (matches hanzo-flow-base/sdk) - module paths/commands/devcontainer hanzoflow -> flow (the import name + CLI) - env vars HANZOFLOW_ -> FLOW_ (was inconsistent with the LANGFLOW_->FLOW_ sweep) - fixed a stale src/backend/base/hanzoflow/ path that didn't exist - product display HanzoFlow -> 'Hanzo Flow' in docs; kept HanzoFlow only as a code identifier where a space is illegal Canonical: pip install hanzo-flow / import flow / `flow` CLI. compileall clean.
Deploy Hanzo Flow on AWS
Duration: 30 minutes
Introduction
In this tutorial, you will learn how to deploy flow 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:
Hanzo Flow 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 flow
- Open AWS CloudShell.
- 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-flow"' ./bin/bootstrap - When you see
Done!in Cloudshell, openc9-for-flowfrom AWS Cloud9.
- Run the following command in the Cloud9 terminal.
git clone https://github.com/hanzoai/flow.git cd flow/scripts/aws cp .env.example .env # Edit this file if you need environment settings npm ci cdk bootstrap cdk deploy - Access the URL displayed.
Outputs: Hanzo FlowAppStack.frontendURLXXXXXX = https://XXXXXXXXXXX.cloudfront.net - Enter your user name and password to sign in. If you have not set a user name and password in your
.envfile, the user name will be set toadminand the password to123456.
Cleanup
- Run the following command in the Cloud9 terminal.
bash delete-resources.sh - Open AWS CloudFormation, select
aws-cloud9-c9-for-flow-XXXXand delete it.
s