slackapi / bolt-python

A framework to build Slack apps using Python
https://slack.dev/bolt-python/
MIT License
1.06k stars 245 forks source link

Deployment of SocketModeHandler on AWS #933

Closed muhammad-ahsan099 closed 1 year ago

muhammad-ahsan099 commented 1 year ago

I am facing challenges with deploying a Slack SocketModeHandler application on AWS. I have developed a Slack bot using SocketModeHandler and it works well in my local environment. However, I am unsure about the steps and configuration required to deploy it on AWS.

I have explored various resources and documentation, but I haven't found a clear guide specifically addressing the deployment of SocketModeHandler on AWS. I am seeking assistance from the community to help me understand the necessary steps, best practices, and potential challenges associated with deploying SocketModeHandler on AWS.

Any guidance, suggestions, or resources related to deploying SocketModeHandler on AWS would be greatly appreciated. Thank you in advance for your support!

seratch commented 1 year ago

Hi @muhammad-ahsan099, thanks for asking the question!

As you know, AWS offers a lot of services, which can be used for deploying Slack apps. When you use SocketMode for running your apps, I recommend going with any of the following:

  1. Build a Docker image of your app and deploy it to:
    • ECS
    • EKS
    • Lightsail Containers

These services require your running container process to respond to healthcheck HTTP requests. Thus, adding a web framework to your app and simply serving the endpoint for heathcheck like this should be necessary. Also, you can follow their standard way to configure env variables to pass.

  1. If you want to avoid using container services, you may want to run your app on:
    • Lightsail (VPS)
    • EC2

Note that, as long as you use Socket Mode, AWS Lambda is not an option for it. You need to use any of AWS's solutions that allow you to run an always-running process somewhere.

I hope this helps.

github-actions[bot] commented 1 year ago

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

github-actions[bot] commented 1 year ago

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.