scripts/aws/README.md
Duration: 30 minutes
In this tutorial, you will learn how to deploy langflow 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: Langflow 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.
git clone https://github.com/aws-samples/cloud9-setup-for-prototyping
cd cloud9-setup-for-prototyping
cat params.json | jq '.name |= "c9-for-langflow"'
./bin/bootstrap
Done! in Cloudshell, open c9-for-langflow from AWS Cloud9.
git clone https://github.com/langflow-ai/langflow.git
cd langflow/scripts/aws
cp .env.example .env # Edit this file if you need environment settings
npm ci
cdk bootstrap
cdk deploy
Outputs:
LangflowAppStack.frontendURLXXXXXX = https://XXXXXXXXXXX.cloudfront.net
.env file, the user name will be set to admin and the password to 123456.
bash delete-resources.sh
aws-cloud9-c9-for-langflow-XXXX and delete it.
s