Overview
This guide covers creating an ECS service running the MergeWatch container on Fargate, connecting it to an RDS PostgreSQL instance, and exposing the webhook endpoint through an Application Load Balancer (ALB) or API Gateway.Prerequisites
1
Install the AWS CLI
2
Set up networking
You need a VPC with at least two subnets (public for the ALB, private for the Fargate tasks). If you do not have one, use the default VPC or create one with:
3
Gather your GitHub App credentials
4
Choose an LLM provider
Set
LLM_PROVIDER to your preferred provider. If using bedrock, no static API key is needed — attach Bedrock permissions to the ECS task role instead.Deploy to ECS / Fargate
1
Create an ECS cluster
2
Store secrets in AWS Secrets Manager
3
Create the task definition
Create a file called Register the task definition:
task-definition.json:4
Create the ECS service
5
Set up an Application Load Balancer
Create an ALB in your public subnets and add a target group pointing to the ECS service on port 3000. The ALB provides a stable HTTPS endpoint for GitHub webhooks.
If using
LLM_PROVIDER=bedrock, you do not need an ANTHROPIC_API_KEY. Instead, attach an IAM policy with bedrock:InvokeModel permission to the ECS task role (mergewatchTaskRole). The SDK uses the task role credentials automatically — no static keys required.Set up Postgres
Amazon RDS (recommended)
Managed PostgreSQL with automated backups, Multi-AZ failover, and Performance Insights.
Aurora Serverless v2
Auto-scaling PostgreSQL-compatible database. Scales down to 0.5 ACU during idle periods.
1
Create an RDS instance
2
Create the database
DATABASE_URL in your task definition to point to the RDS endpoint.Configure the webhook URL
Set the webhook URL on your GitHub App to the ALB DNS name (or your custom domain) followed by/webhook:
Next steps
Configure review behavior
Tune sensitivity, ignored paths, and review focus areas.
Environment variables
Full list of supported environment variables.
Troubleshooting
Common issues and how to fix them.
Upgrading
How to update MergeWatch to the latest version.