This project provides an AWS CDK stack to deploy listmonk — a high performance self-hosted mailing list and campaign manager — on AWS Elastic Beanstalk with an Aurora PostgreSQL Serverless v2 backend.
The stack provisions:
- VPC with public and private subnets
- Security groups for ALB, EB instances, and Aurora DB
- Aurora PostgreSQL Serverless v2 cluster with Secrets Manager
- Elastic Beanstalk environment (ALB + EC2 instances) running listmonk Docker image
- HTTPS listener with your ACM certificate
- Rolling deployments and managed platform updates
- Node.js 18+ with nvm
- AWS CLI configured
- AWS CDK v2 installed
- An ACM certificate in us-east-1 (required by EB ALB)
-
Clone the repo
git clone https://github.com/guillegette/listmonk-eb.git cd listmonk-cdk -
Install dependencies
npm install
-
Bootstrap CDK (only once per account/region)
cdk bootstrap --region us-east-1 --profile your-profile
-
Deploy
npx cdk deploy ListmonkEbStack \ --parameters ListmonkEbStack:AcmCertArn=arn:aws:acm:us-east-1:<account-id>:certificate/<your-cert-id> \ --parameters ListmonkEbStack:ListmonkImageTag=v5.0.3 \ --require-approval never \ --region us-east-1 --profile your-profile
On successful deploy, CDK will print:
- VpcId – VPC id
- AppSgId – EB instance security group
- DbEndpoint – Aurora cluster endpoint
- DbSecretArn – ARN of the DB secret in Secrets Manager
- Instance size: default is t3.medium. Change in listmonk-eb-stack.js.
- Aurora capacity: default serverless v2 range is 0.5–8 ACUs. Adjust serverlessV2MinCapacity and serverlessV2MaxCapacity.
- Time zone: environment variable TZ. Update if needed.
- Managed updates: set PreferredStartTime to control when EB applies platform updates.