langflow/scripts/aws
Eric Hare 28e07be870
feat: Unified File Management API (#6100)
* feat: FIrst pass at file management API

* [autofix.ci] apply automated fixes

* Add delete and edit endpoints

* [autofix.ci] apply automated fixes

* Add file size and duplicate name handling

* Ensure the File model has a unique name

* Ensure count is before extension

* [autofix.ci] apply automated fixes

* Add the correct path to the return

* Added function to handle list of paths in File component

* [autofix.ci] apply automated fixes

* Update input_mixin.py

* Refactor to a v2 endpoint

* Add unit tests

* Update test_files.py

* Update frontend.ts

* [autofix.ci] apply automated fixes

* Remove extension from name

* Cast the string type for like

* Update files.py

* Update base.py

* Update base.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
2025-02-06 18:35:24 +00:00
..
bin Fix bug in deployment procedure in AWS CDK and support HTTPS (#1491) 2024-03-04 08:50:51 -03:00
img Fix bug in deployment procedure in AWS CDK and support HTTPS (#1491) 2024-03-04 08:50:51 -03:00
lib feat: Unified File Management API (#6100) 2025-02-06 18:35:24 +00:00
test 本家の踏襲のため、Dockerfileを変更 2023-11-30 16:47:30 +09:00
.env.example add archi 2023-12-02 01:11:30 +00:00
.gitignore 本家の踏襲のため、Dockerfileを変更 2023-11-30 16:47:30 +09:00
.npmignore 本家の踏襲のため、Dockerfileを変更 2023-11-30 16:47:30 +09:00
cdk.json Fix bug in deployment procedure in AWS CDK and support HTTPS (#1491) 2024-03-04 08:50:51 -03:00
delete-docker-images.sh 本家の踏襲のため、Dockerfileを変更 2023-11-30 16:47:30 +09:00
delete-resources.sh Fix bug in deployment procedure in AWS CDK and support HTTPS (#1491) 2024-03-04 08:50:51 -03:00
jest.config.js 本家の踏襲のため、Dockerfileを変更 2023-11-30 16:47:30 +09:00
package-lock.json Bump braces from 3.0.2 to 3.0.3 in /scripts/aws 2024-07-01 13:53:39 -03:00
package.json Fix AWS deployment (#1893) 2024-05-19 17:13:22 -07:00
README.ja.md Update repository URLs to use langflow-ai instead of logspace-ai (#1642) 2024-04-08 15:36:37 -03:00
README.md Update repository URLs to use langflow-ai instead of logspace-ai (#1642) 2024-04-08 15:36:37 -03:00

Deploy Langflow on AWS

Duration: 30 minutes

Introduction

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-archi 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.

How to set up your environment and deploy langflow

  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-langflow"'
    ./bin/bootstrap
    
  3. When you see Done! in Cloudshell, open c9-for-langflow from AWS Cloud9. make-cloud9
  4. Run the following command in the Cloud9 terminal.
    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
    
  5. Access the URL displayed.
    Outputs:
    LangflowAppStack.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-langflow

Cleanup

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