Rentall Infrastructure
AWS CDK infrastructure for Rentall Lambda functions.
Prerequisites
- Node.js 20+
- AWS CLI configured with appropriate credentials
- AWS CDK CLI (
npm install -g aws-cdk)
Setup
cd infrastructure/cdk
npm install
Deploy
Staging
npm run deploy:staging
Production
npm run deploy:prod
Environment Variables
The following environment variables should be set before deployment:
DATABASE_URL- PostgreSQL connection stringCDK_DEFAULT_ACCOUNT- AWS account IDCDK_DEFAULT_REGION- AWS region (defaults to us-east-1)
Stacks
ConditionCheckLambdaStack
Creates:
- Lambda function for condition check reminders
- EventBridge Scheduler group for per-rental schedules
- IAM roles for Lambda execution and Scheduler invocation
- Dead letter queue for failed invocations
Outputs
After deployment, the following values are exported:
ConditionCheckLambdaArn-{env}- Lambda function ARNConditionCheckScheduleGroup-{env}- Schedule group nameConditionCheckSchedulerRoleArn-{env}- Scheduler IAM role ARNConditionCheckDLQUrl-{env}- Dead letter queue URL
Useful Commands
npm run synth- Synthesize CloudFormation templatenpm run diff- Compare deployed stack with current statenpm run destroy- Destroy all stacks