This project is built on the serverless framework and creates the following AWS resources when deployed:
- SecretsManager secret
- Lambda function w/ CloudWatch metric and alarm
- SNS topic
- AWS CLI has been configured
- Twitter API credentials have been generated
yarn install
Create the deployment bucket (see serverless.yml
for bucket name) for CloudFormation:
aws s3 mb s3://<bucket-name>
See environment.yml
for stage-specific variables.
sls deploy -v -s <stage> --aws-profile <profile>
After the initial deployment, update the newly created secret via the SecretsManager console. The secret must have the following key/value pairs with your Twitter API credentials:
{
"apiKey": "",
"apiKeySecret": "",
"accessToken": "",
"accessTokenSecret": ""
}
sls remove -v -s <stage> --aws-profile <profile>