infra/template.yaml) defines all AWS resources required to run the pipeline. It deploys with a single command:
The project uses a
scripts/deploy.sh wrapper around sam build && sam deploy — invoke it with pnpm run deploy:dev / deploy:staging / deploy from the mergewatch.ai repo. You only need to invoke SAM directly if you are customizing deployment flags.Parameters
The template accepts four parameters that control the deployment:Resources created
The template creates the following AWS resources:Outputs
After deployment, the stack exports these values:
You can retrieve outputs at any time with:
IAM permissions
The Lambda execution role follows least-privilege principles. It includes the following permissions:CloudWatch Logs
CloudWatch Logs
logs:CreateLogGroup, logs:CreateLogStream, logs:PutLogEventsAllows both Lambda functions to write execution logs to CloudWatch.DynamoDB
DynamoDB
dynamodb:GetItem, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:QueryScoped to the two MergeWatch tables only. No Scan or DeleteItem permissions are granted.Amazon Bedrock
Amazon Bedrock
bedrock:InvokeModelScoped to the model ID specified in the DefaultBedrockModelId parameter. The ReviewAgent uses this to call the multi-agent pipeline.SSM Parameter Store
SSM Parameter Store
ssm:GetParameterScoped to /mergewatch/{stage}/*. Allows Lambda to decrypt and read GitHub App credentials at runtime.Lambda Invoke
Lambda Invoke
lambda:InvokeFunctionScoped to the ReviewAgent function ARN. WebhookHandler uses this to invoke ReviewAgent asynchronously (InvocationType.Event).Customization
You can override template parameters in two ways:For the full list of
sam deploy options, see the AWS SAM CLI reference.Next steps
Architecture Overview
Understand how the components connect end-to-end.
Self-Hosted Install
Deploy MergeWatch on your own infrastructure with Docker.