https://github.com/nikosalonen/domain-pollenator
A serverless microservice that monitors domain expiration dates and sends email notifications when domains actually expire. Built with AWS CDK and designed to stay within AWS free tier limits.
https://github.com/nikosalonen/domain-pollenator
Last synced: 3 months ago
JSON representation
A serverless microservice that monitors domain expiration dates and sends email notifications when domains actually expire. Built with AWS CDK and designed to stay within AWS free tier limits.
- Host: GitHub
- URL: https://github.com/nikosalonen/domain-pollenator
- Owner: nikosalonen
- Created: 2025-12-21T12:06:03.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-21T14:43:50.000Z (6 months ago)
- Last Synced: 2025-12-23T04:44:38.479Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Domain Pollenator
A serverless microservice that monitors domain expiration dates and sends email notifications when domains actually expire. Built with AWS CDK and designed to stay within AWS free tier limits.
## Architecture
- **DynamoDB**: Stores domain information (name, expiration date, status)
- **Lambda Functions**:
- Scheduler: Runs daily to determine which domains need checking
- Domain Checker: Queries RDAP API to get expiration dates
- Notification Sender: Sends email alerts via SES
- **EventBridge**: Daily cron trigger (midnight UTC)
- **SES**: Email notifications
## Prerequisites
- Node.js 18+ and npm
- AWS CLI configured with appropriate credentials
- AWS CDK CLI: `npm install -g aws-cdk`
- SES email address verified in AWS Console
## Setup
1. Install dependencies:
```bash
npm install
```
2. Set your notification email (optional, defaults to `your-email@example.com`):
```bash
export NOTIFICATION_EMAIL=your-email@example.com
```
Optionally set the sender email address (defaults to `noreply@domain-pollenator.com`):
```bash
export SENDER_EMAIL=noreply@yourdomain.com
```
3. Bootstrap CDK (first time only):
```bash
cdk bootstrap
```
4. Deploy the stack:
```bash
npm run deploy
```
## Adding Domains
After deployment, add domains to the DynamoDB table. You can use the AWS Console or CLI:
```bash
aws dynamodb put-item \
--table-name \
--item '{"domainName": {"S": "example.com"}}'
```
The scheduler will automatically check domains right after their expiration date. Domains are scheduled to be checked 1 day after their expiration date to verify if they have actually expired.
## SES Configuration
Before the service can send emails, you must:
1. Verify your notification email address in SES Console (the recipient)
2. Verify your sender email address in SES Console (defaults to `noreply@domain-pollenator.com`, or set via `SENDER_EMAIL`)
3. If in SES Sandbox, verify both sender and recipient emails
4. Request production access if needed (for sending to unverified emails)
## Free Tier Considerations
This service is designed to stay within AWS free tier:
- DynamoDB: 25 GB storage, 25 read/write units (sufficient for <50 domains)
- Lambda: 1M requests/month, 400K GB-seconds
- EventBridge: 1M custom events/month
- SES: 62,000 emails/month
- CloudWatch Logs: 5 GB ingestion, 5 GB storage
## Useful Commands
- `npm run build` - Compile TypeScript
- `npm run watch` - Watch for changes and compile
- `npm run cdk synth` - Synthesize CloudFormation template
- `npm run cdk deploy` - Deploy stack to AWS
- `npm run cdk diff` - Compare deployed stack with current state
- `cdk destroy` - Destroy the stack
## Troubleshooting
- Check CloudWatch Logs for Lambda execution logs
- Verify SES email is verified in AWS Console
- Ensure DynamoDB table exists and has correct permissions
- Check EventBridge rule is enabled and scheduled correctly