This is a small serverless application which utilizes
- twitter api
- open ai api
- SourceCodeShots
- AWS (Lambda, EventBridge, CDK)
to automatically post ai-generated tweets including code snippets as images on a cron based schedule.
- AWS Account
- Twitter & Twitter developer account. Create a twitter app and make sure to store the
consumer-key
,consumer-key-secret
,access-key
,access-key-secret
as AWS SSM Paramters at the respective path/twitter-bot/twitter-client/[key-name]
- OpenAI api-key stored as a ssm parameter
/twitter-bot/openai-api-key
- clone the project
git clone https://github.com/timges/serverless-twitter-bot.git
- login to aws by running
aws configure
- install dependencies
pnpm install
- (optional): customize the prompts here
- deploy to your aws account
npx cdk deploy
- ✅ Done