-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add built-in AwsLambdaReceiver #784
Comments
We'll use issue #815 to add documentation and example code for |
@seratch @mwbrooks I am still having issues with the AWS Lambda + OAuth process. I am using it bolt successfully for handling events, dialogs etc. But I am trying to convert our old code to both for our oauth install and callback. We are getting the following error.
Here is an example of the code - https://gist.github.com/viperfx/310a5ad7aed0f300889d52234b2fb85e |
@viperfx As the
For the OAuth flow part, please consider using |
@seratch ok - that's fine. Is there a full example of how to use the ExpressReceiver? Is the code at the top of PR what we follow? |
@viperfx Here is an example app: https://github.com/slackapi/bolt-js/tree/main/examples/oauth-express-receiver Also, you can use https://github.com/vendia/serverless-express to make your Express functional as an AWS Lambda handler. |
Ah I see. Yea ideally we just want to setup everything and return a handler function. Are you aware of a method that does not involve adding an external library? |
PS - I gave it a quick try.
Where receiver is an instance of ExpressReciever - and I got the following error.
|
I don't have any alternatives for it. The only alternative that I can suggest at this point is to implement a simple OAuth handler relying on only
The default receiver is For the future, we'd love to add an easier solution for OAuth flow using AWS Lambda but we don't have the bandwidth in the short term. I will be away from keyboard for a while. I hope this helps! |
We actually had a version we were using
But then something changed in the slack package and we started getting the following
As for the serverlessExpress library
I am using the ExpressReceiver - mentioned in my previous comment.
|
Are there plans to make the |
Description
We have been recommending the combination of ExpressReceiver + aws-serverless-express for AWS Lambda deployments. https://slack.dev/bolt-js/deployments/aws-lambda
Although it's still a great option for running Bolt apps on AWS Lambda, initializing an Express app plus running aws-serverless-express as an adapter may cause unnecessary overhead for both booting and response time.
For OAuth flow handing, we still recommend using
ExpressReceiver
and aws-serverless-express. The reason for this is that@slack/oauth
package depends on the standard HTTP module in Node. The following is a simple SAM app example. You can find the complete version here: https://github.com/seratch/bolt-js-aws-lambdaSee also:
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)The text was updated successfully, but these errors were encountered: