Deploy MergeWatch to AWS ECS with Fargate for serverless containers.
AWS ECS with Fargate runs MergeWatch as a serverless container task — no EC2 instances to manage. Choose this option when you want MergeWatch on AWS but need VPC networking, private subnets, or predictable billing instead of the Lambda-based deployment.
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.
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:
Copy
Ask AI
aws ec2 create-default-vpc
3
Gather your GitHub App credentials
Variable
Description
GITHUB_APP_ID
Numeric App ID from the GitHub App settings page
GITHUB_PRIVATE_KEY
PEM-formatted private key generated for the App
GITHUB_WEBHOOK_SECRET
Secret used to validate incoming webhook payloads
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.
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.