cohere-toolkit

AWS Deployment using AWS Copilot for Cohere’s Toolkit

This guide provides instructions for deploying Cohere’s Toolkit on AWS using AWS Copilot. AWS Copilot is a CLI tool that simplifies building, releasing, and managing production-ready applications on Amazon ECS with AWS Fargate.

Limitations

Prerequisites

Before starting, ensure you have:

Deployment Steps

1. Create an IAM User

  1. Go to the IAM console and click Users.
  2. Click Create user and enter a username.
  3. Select Provide user access to the AWS Management Console - optional and choose password settings.
  4. Click Next: Permissions, then Attach policies directly.
  5. Search for AdministratorAccess, select it, and proceed with Next.
  6. Review and click Create user.
  7. After creating the user, select it and go to the Security credentials tab.
  8. Click Create access key, choose Other, and proceed.
  9. Copy the Access key and Secret access key and store them securely.

2. Configure the AWS CLI

3. Set environment variables

The deployment script uses configuration values from either the .env or configuration.yaml file. Set the following environment variable in the .env file:

DATABASE_URL='postgresql+psycopg2://postgres:postgres@{service name}.{env name}.{app name}.local:5432'

Or, in the configuration.yaml file::

database:
  url: postgresql+psycopg2://postgres:postgres@{service name}.{env name}.{app name}.local:5432

For the current deployment, the database URL should be:

postgresql+psycopg2://postgres:postgres@toolkit-app-db.dev.toolkit-app.local:5432

4. Deploy the Toolkit

  1. Navigate to the root directory of the cloned repository.
  2. Run the deployment script:
    ./aws_copilot_deploy/aws_deploy.sh
    
  3. Wait for the deployment to complete. The script will output the URL of the deployed application.

5. Clean Up

Detailed Description

The provided deployment script uses AWS Copilot to set up an application, environment, and services on AWS Fargate. This deployment includes: