How to set rasa bot on aws EC2 or aws Lambda

Hi, I’m new to rasa so my question is quite basic, I’ve trained a rasa model on my local machine and has successfully integrate that with UI (frontend) as well. So I’m using two commands (i.e. rasa run actions , and rasa run ) on CLI. My bot is running pretty good on my local server. In the script file of bot i’ve mentioned endpoint for rasa (“http://localhost:5055/webhook”) where bot is sending requests. So now i wanted to deploy the whole thing on AWS EC2 instance but I’ve no experience with deploying models on cloud. I can setup an EC2 instance, setup a python environment and can pass endpoint for that to my bot’s script file as well. I’ve rasa’s trained tar.gz file.

Also i wanted to know if I can do the same on AWS Lambda?

Just need help in setting thing like:

  1. Which files i need to upload to EC2
  2. Storage needed, RAM
  3. How to run server there (both action server and normal rasa server, if required)

Any help would be highly appreciated.

You really can’t do what you are trying to do with lambda, maybe have the action server as lambda sure but not run the actual bot.

Typically you would have a ec2 setup with all your bot code you could just git clone it etc. Then train the model and you should be golden.

Storage concerns are really related to how big your training data is and as far as RAM and such we recommend in our Docs - Deploy to a Server we recommend 8GB and 2-6vcpu’s so you would just pick the proper ec2 instance type based on that.

You run the server the same was as local, run the action server command.

Running the Server and you can use the rasa run actions command to setup your action server, remember these both have to be running like putting it in the foreground or on separate SSH sessions.

Let me know if I forgot any questions you asked or you need further clarification

HI ! i have a similar query. I’m deploying rasa on gcp . Now my doubt is how to keep my action server running forever ? i also start my action server using “rasa run actions” and i also integrated rasa with webchat . Any idea how can i deploy rasa over there and make action server run forever?

I think you’re looking for the “nohup” command, but I suppose you found the answer 4 years down the line :smiley: