The Slack to Text Application is an AWS Lambda-based service that utilizes a Slack custom application that sends a a message via Twilio SMS if during a certain time range default = 8:00am-10:30am Eastern.
The application is triggered by a custom Slack Event application. It invokes an AWS Lambda function that sends a Twilio text messsage.
- AWS CLI already configured with at least PowerUser permission
- Python 3.10 installed
- SAM CLI installed
In this example, we use the sam build
command to automatically download dependencies defined in requirements.txt
and create a deployment package. This package is what will be uploaded to Lambda when you deploy the application.
sam build
You can test the function locally by invoking it with the SAM CLI, using a test event defined in a file.
sam local invoke SlackToText --event event.json
The sam deploy
command will package and deploy your application to AWS, with a series of prompts:
sam deploy --guided
When prompted for parameters, you can either accept the default values or provide custom ones based on your environment and requirements.
To simplify troubleshooting, SAM CLI has a command called sam logs
. sam logs
lets you fetch logs generated by your deployed Lambda function from the command line.
sam logs -n SlackToText --stack-name slack-to-text --tail
To delete the Slack to Text Application that you created, use the AWS CLI. Assuming you used your project name for the stack name, you can run the following:
aws cloudformation delete-stack --stack-name slack-to-text
For more information about the AWS SAM CLI, see the AWS SAM CLI User Guide.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE file for details.