This is a lambda function to check a twitter users timeline and post any new tweets to a discord webhook.
- Docker is used to build and package the function
- Terraform is used to provision the infrastructure for this serverless function.
- git clone the repo
- modify
variables.tf
to set your unique bucket name and region - rename
secrets\keys.template
tosecrets\keys.json
- add your api keys and webhook to
secrets\keys.json
- run
build.cmd
- builds and packages the function - run
terraform plan
- make sure you have your aws creds available - run
terraform apply
- deploys the application
Its should now be installed, however you need to add entires for each user you want to follow into the dynamodb table.
{
"screen_name": { S: 'OpenAI' },
"since_id": { S: '867411728857939970' },
"exclude_replies": { BOOL: true }
}
Terraform provisions the following:
- IAM role
- IAM policy
- Lambda function
- Cloudwatch event
- Dynamodb table
- Cloudwatch log group
- KMS key
- S3 bucket
- S3 object with encrypted secrets
enjoy!