Skip to content

Create a Slack bot with unlimited potential using the Slack Events API, but don't want to spend hours searching for resources or figuring out AWS Lambda functions in Python

License

Notifications You must be signed in to change notification settings

czantoine/slack-bot-aws-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Bot using AWS Lambda

Slack Shield Repo size Stars Twitter Linkedin

This AWS CloudFormation template creates a simple Slack bot using AWS Lambda, Amazon API Gateway HTTP API, and AWS Identity and Access Management (IAM).

The Lambda function in this template receives an event from the HTTP API Gateway, extracts the body of the Slack event, and returns the challenge answer back to Slack.

Setup

You can find the details of the installation on this blog post

Prerequisites

You will need:

  • AWS account
  • Slack Account and Slack Workspace

How to Use

To use this CloudFormation template, follow these steps:

  1. Upload the CloudFormation template to your AWS account.
  2. Create a stack with the template in your AWS account.
  3. When creating the stack, provide the Slack bot token and AWS account number as parameters.
  4. After the stack is created, you can find the HTTP API endpoint in the stack output. Use this endpoint to configure your Slack bot's event subscriptions.
  5. python.py file to update the Lambda function.

CloudFormation Resources

This template creates the following resources:

  • IAM role for the Lambda function
  • Lambda function
  • API Gateway HTTP API
  • Lambda function resource permission for the API Gateway HTTP API

Template Parameters

This template uses the following parameters:

  • BotToken: The Slack bot token.
  • AccountNumber: The AWS account number.
  • AppName (optional): The name of the application. The default value is apigw-http-slack-lambda.

Template Outputs

This template creates the following output:

  • HttpApiEndpoint: The default endpoint for the HTTP API.

Security

See CONTRIBUTING for more information.

License

This repository is licensed under the Apache License 2.0. See the LICENSE file.

About

Create a Slack bot with unlimited potential using the Slack Events API, but don't want to spend hours searching for resources or figuring out AWS Lambda functions in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages