BotBuilder-Samples icon indicating copy to clipboard operation
BotBuilder-Samples copied to clipboard

[Feature Request] Example of running botframework in AWS API Gateway

Open joel-cunningham opened this issue 9 years ago • 8 comments

I have a bot deployed on AWS API Gateway which is using serverless technology. The bot works fine on my machine and I can see requests coming in to /api/messages in API Gateway. But these messages are not being passed to the connector.listen().

Is there any guidance on how requests should interact with the botframework running on this platform?

joel-cunningham avatar Feb 27 '17 23:02 joel-cunningham

There is some info for Azure Functions here https://github.com/Microsoft/BotBuilder/issues/1558#issuecomment-257959505 but I'm also looking for an example that works on AWS Lambda + AWS API Gateway. Some tips in this stackoverflow question.

palmerabollo avatar Apr 24 '17 08:04 palmerabollo

This should be possible. It's unlikely that we'll provide a running sample of working with AWS, but the knowledge is out there on Stack Overflow and in the broader developer community.

benbrown avatar Mar 29 '19 20:03 benbrown

@joel-cunningham I ended up creating this lib https://github.com/palmerabollo/botbuilder-aws-lambda/ that exposes your bot created with botframework as an AWS Lambda function. It worked like a charm, at least with botframework v3 that is what I'm using. Somebody said it needs some minor tweaks to make it work with v4. Contributions are welcome.

palmerabollo avatar Mar 30 '19 10:03 palmerabollo

@palmerabollo can you explain how we deploy our bot to AWS with your package?

wethil avatar Apr 14 '19 19:04 wethil

@wethil You have two options:

  1. zip your project and unload it to AWS Lambda. The easiest way if you just want to give it a try.
  2. use a tool such as serverless to automate the deployment.

palmerabollo avatar Apr 14 '19 21:04 palmerabollo

@palmerabollo I tried to use your package with serverless but I think I could not configure handler section on serverless.yml file correctly. Do you have any example of that?

wethil avatar Apr 15 '19 14:04 wethil

@wethil I've put together an example here https://github.com/palmerabollo/bot-food/blob/master/serverless.yml I hope it helps.

palmerabollo avatar Apr 15 '19 20:04 palmerabollo

it perfectly helps. Thanks a lot @palmerabollo

wethil avatar Apr 15 '19 21:04 wethil