Deployment
Deployment guide for the RawStack Notification component.
The Notification service is deployed as an AWS Lambda function managed by the CDK infrastructure stack. It is triggered by EventBridge rules rather than by direct HTTP requests.
Build
Build the service from the notification project directory:
cd services/notification
npm run buildThe compiled output in dist/ is used as the Lambda deployment package.
Deploy via CDK
The notification Lambda is deployed as part of the Core stack:
cd infrastructure/aws
npm run cdk deploy coreDuring deployment, CDK packages the compiled output and updates the Lambda function.
EventBridge integration
The API publishes domain events to EventBridge, and the Core stack defines rules that route selected event types to the notification Lambda.
When adding support for a new event:
- Implement and register the corresponding strategy in the Notification service.
- Add or update the matching EventBridge rule in the Core stack.
- Deploy the Core stack again.
Environment variables in production
Provider credentials and runtime settings are injected as Lambda environment variables by the CDK stack. These values are defined in infrastructure/aws/.env and applied at deploy time.
Never hard-code credentials in the service source code or commit real secrets to version control.