A serverless Twitter Bot that Tweets new releases on Steam and if that new release happens to be Half-Life 3.
- Python 3.6.x
- AWS CLI
- Twitter API Credentials
Add dependencies and Lambda function to a zip archive, then create a Lambda function with the create-function command.
$ cd package
$ zip -r9 half-life3-bot.zip .
$ cd ..
$ zip -g half-life3-bot.zip half-life3-bot.py
$ aws lambda create-function --function-name half-life3-bot \
--zip-file fileb://half-life3-bot.zip --handler half-life3-bot.handler \
--runtime python3.6 --role arn:aws:iam::123456789012:role/lambda-cli-role
Where 123456789012 is the Role arn.
Additionally, you can also create the Lambda function via the AWS console. You will need to change the default handler to half-life3-bot.handler. Then, run ./updateLambda.sh
This function assumes you set and encrypt environment variables.