Generates an inspirational quote from Uncle Iroh, and sends it via SMS to an approved recipient.
- V1: Runs locally on developer workstation, sends via SNS
- V2: Runs as AWS Lambda function (planned)
Required:
APPROVED_PHONE_NUMBERS: Comma-separated list of phone numbers that can receive messages
AI Configuration:
AI_PROVIDER: Set toopenaito use OpenAI, defaults tomockif not setOPENAI_API_KEY: Required whenAI_PROVIDER=openaiOPENAI_MODEL: OpenAI model to use. Defaults togpt-4o-mini
AWS Configuration:
- AWS credentials (any of):
- Environment:
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY - Shared credentials file:
~/.aws/credentials - IAM role (when running on EC2 or Lambda)
- Environment:
- Region: us-east-2 (hardcoded)
- Required permissions: SNS:Publish to send messages
- When running in Lambda (V2), uses the Lambda execution role
- Uses AWS SDK's default credential chain
- Only sends to pre-approved phone numbers
- Phone number list managed via environment variables
- Validates all recipient numbers against approved list
- Supports multiple AI providers via configuration
- Uses AWS SNS for reliable SMS delivery
- JSON structured logging for monitoring
- Consider tracking used quotes to avoid repetition
- Lambda deployment (V2)
- Expanded AI provider options
- Configure .env (see .env.example)
- Run the application:
go run ./cmd/quote-sender