Files
langflow/scripts/aws
2023-12-09 10:53:44 +09:00
..
2023-12-05 03:34:28 +00:00
2023-12-05 03:34:28 +00:00
2023-12-02 01:11:30 +00:00
2023-12-05 03:34:28 +00:00
2023-11-30 17:14:10 +09:00
2023-11-30 17:14:10 +09:00
2023-12-09 10:47:50 +09: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

Application Load Balancer, AWS Fargate and Amazon Aurora are created by AWS CDK. The aurora's secrets are managed by AWS Secrets Manager. The Fargate task is divided into a frontend and a backend, which communicate through service discovery. If you just want to deploy resources, you do not need in-depth knowledge of each of the above services.

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
    ./bin/bootstrap
    
  3. When you see Done! in Cloudshell, open cloud9-for-prototyping from AWS Cloud9. make-cloud9
  4. Run the following command in the Cloud9 terminal.
    git clone -b aws-cdk https://github.com/logspace-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.NetworkURLXXXXXX = http://alb-XXXXXXXXXXX.elb.amazonaws.com
    
  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-cloud9-for-prototyping-XXXX and delete it. delete-cfn