We provide a template file for you to get started deploying on ECS.
- In the ECS Dashboard, click Create Cluster
- Select
EC2 Linux + Networking
as the cluster template. - In your instance configuration, enter the following:
- Select On-demand instance
- Select t2.medium as the instance type (or your desired instance size)
- Choose how many instances you want to spin up
- (Optional) Add key pair
- Choose your existing VPC (or create a new one)
- (Optional) Add tags
- Enable CloudWatch container insights
- Select the VPC in which you’d like to launch the ECS cluster; make sure that you select a public subnet.
- Download the retool.yaml file, and add your license key and other relevant variables.
- Go to the AWS Cloudformation dashboard, and click Create Stack with new resources → Upload a template file. Upload your edited
retool.yaml
file. - Then, enter the following parameters:
- Cluster: the name of the ECS cluster you created earlier
- DesiredCount: 2
- Environment: staging
- Force: false
- Image:
tryretool/backend:X.Y.Z
(But replaceX.Y.Z
with your desired version. See Select a Retool version number to help you choose a version.) - MaximumPercent: 250
- MinimumPercent: 50
- SubnetId: Select 2 subnets in your VPC - make sure these subnets are public (have an internet gateway in their route table)
- VPC ID: select the VPC you want to use
- Click through to create the stack; this could take up to 15 minutes; you can monitor the progress of the stack being created in the
Events
tab in Cloudformation - After everything is complete, you should see all the resources with a
CREATE_COMPLETE
status. - In the Outputs section within the CloudFormation dashboard, you should be able to find the ALB DNS URL. This is where Retool should be running.
- The backend tries to guess your domain to create invite links, but with a load balancer in front of Retool you'll need to set the
BASE_DOMAIN
environment variable to your fully qualified domain (i.e.https://retool.company.com
). Docs here.
If running into OOM issues (especially on larger instance sizes with >4 vCPUs)
- Verify the issue by going into the ECS console and checking the Service Metrics. Ideally
- Memory utilization should fall around 40% (20% - 60%)
- CPU utilization should be close to zero (0% - 5%)
- If the values fall outside these ranges, increase the CPU and memory allocation in
retool.yml