Use CloudFormation to connect your AWS account
Step 1: Create your team in Judoscale
Sign up for a Judoscale account, and select “Amazon ECS” for your hosting platform. If you already have an account, click the “Add Team” button in the sidebar.
Step 2: Create the IAM role for Judoscale
We provide a CloudFormation template that creates a read-only IAM role for Judoscale. Click the “Launch Stack” button to open CloudFormation and run the stack.
After the stack has completed, you’ll paste the IAM role ARN into Judoscale, and click “List ECS clusters“.
👀 Note
This IAM role is read-only, and cannot modify your ECS clusters or services. Judoscale needs this role to list your ECS clusters and services in the next step. For more details on our IAM setup, see here.
Step 3: Link your ECS cluster
Judoscale will connect to Amazon ECS and list your clusters across all regions. Select the cluster you want to link to Judoscale.
Linking the cluster takes you to the team dashboard, showing all services in the cluster with the number of tasks running and their autoscaling status within Judoscale.
You can link additional clusters by clicking “Link another ECS cluster” in the team dashboard.
👀 Note
If you have multiple AWS accounts, each account will need its own Judoscale team. Click “Add Team” in the sidebar to connect another AWS account.
Step 4: Install the Judoscale package
Click “Set up autoscaling” on the service you want to autoscale. This takes you to the Scaling page, where you’ll be prompted to install the package. The package is how Judoscale collects metrics from your application, similar to a lightweight APM tool, and the instructions will differ based on your selected application stack.
You’ll also need to set a JUDOSCALE_URL
environment variable in your task definition. This is how the Judoscale package knows where to send metrics and ensures those metrics are linked to your service.
Step 5: Grant update permissions for Judoscale
Autoscaling means changing the number of running tasks, so Judoscale needs update permissions for your ECS services. In the spirit of Principle of Least Privilege, we don’t ask for this until you enable autoscaling.
Turning on autoscaling for the first time will prompt you to run another CloudFormation stack, granting Judoscale update access to the linked ECS services.
👀 Note
If you’re already autoscaling your services through AWS, you should disable this before enabling autoscaling in Judoscale. Using multiple autoscalers on the same service will cause unpredictable scaling behavior.
After you run the stack and click “Verify permissions”, autoscaling is enabled!
The default configuration is usually a great place to start. For a full tour of the available charts and configuration options, use the links below: