Search
ctrl+/
Ask AI
ctrl+.
Light
Dark
System
Sign in

Deploying Gel to AWS

Gel Cloud: The easiest way to run Gel

Gel Cloud is the official hosted service managed by the Gel team, offering the simplest and most reliable way to run Gel in production. While self-hosting is possible (as shown in these guides), Gel Cloud provides a seamlessly integrated experience with perfect compatibility between local development and production environments. It includes a generous free tier, Vercel and GitHub (deploy previews work out of the box), a hosted UI, and using it directly supports the development of Gel itself!

Try Gel Cloud today at cloud.geldata.com

In this guide we show how to deploy Gel on AWS using Amazon Aurora and Elastic Container Service.

We maintain a CloudFormation template for easy automated deployment of Gel in your AWS account. The template deploys Gel to a new ECS service and connects it to a newly provisioned Aurora PostgreSQL cluster. The created instance has a public IP address with TLS configured and is protected by a password you provide.

Click here to start the deployment process using CloudFormation portal and follow the prompts. You'll be prompted to provide a value for the following parameters:

  • DockerImage: defaults to the latest version (geldata/gel), or you can specify a particular tag from the ones published to Docker Hub.

  • InstanceName: ⚠️ Due to limitations with AWS, this must be 22 characters or less!

  • SuperUserPassword: this will be used as the password for the new Gel instance. Keep track of the value you provide.

Once the deployment is complete, follow these steps to find the host name that has been assigned to your Gel instance:

  1. Open the AWS Console and navigate to CloudFormation > Stacks. Click on the newly created Stack.

  2. Wait for the status to read CREATE_COMPLETE—it can take 15 minutes or more.

  3. Once deployment is complete, click the Outputs tab. The value of PublicHostname is the hostname at which your Gel instance is publicly available.

  4. Copy the hostname and run the following command to open a REPL to your instance.

    Copy
    $ 
    gel --dsn gel://admin:<password>@<hostname> --tls-security insecure
    Gel x.x
    Type \help for help, \quit to quit.
    gel>

It's often convenient to create an alias for the remote instance using gel instance link.

Copy
$ 
  
  
  
gel instance link \
   --trust-tls-cert \
   --dsn gel://admin:<password>@<hostname> \
   my_aws_instance

This aliases the remote instance to my_aws_instance (this name can be anything). You can now use the -I my_aws_instance flag to run CLI commands against this instance, as with local instances.

The command groups gel instance and gel project are not intended to manage production instances.

Copy
$ 
gel -I my_aws_instance
Gel x.x
Type \help for help, \quit to quit.
gel>

To make changes to your Gel deployment like upgrading the Gel version or enabling the UI you can follow the CloudFormation Updating a stack instructions. Search for ContainerDefinitions in the template and you will find where Gel's environment variables are defined. To upgrade the Gel version specify a docker image tag with the image name geldata/gel in the second step of the update workflow.

Alternatively, if you prefer to use AWS CLI, run the following command in your terminal:

Copy
$ 
  
  
  
  
  
aws cloudformation create-stack \
  --stack-name Gel \
  --template-url \
    https://gel-deployment.s3.us-east-2.amazonaws.com/gel-aurora.yml \
  --capabilities CAPABILITY_NAMED_IAM \
  --parameters ParameterKey=SuperUserPassword,ParameterValue=<password>

Using an HTTP client, you can perform health checks to monitor the status of your Gel instance. Learn how to use them with our health checks guide.