Guidelines to best deploy Rasa Stack to AWS?

My project is made up of 3 servers (4 later on with the Tracker Store), which are basically Core, NLU, and the Action server.

I’ve been trying to get things deployed to AWS, but I’ve been having some trouble getting it deployed to a multi-container Docker app on Elastic Beanstalk. If others have worked on deployment, do you suggest working with Fargate or ECS directly to get the project deployed out.

Ideally I’d like to just have one endpoint (Rasa Core) exposed to the open internet, so Rasa NLU and the Action server would likely sit in a VPC with the Core server?

@niveK Did you find a solution to deploy RASA on AWS?

Curious as well on this if you got any further on this? I"m going to be working on setting up Rasa X on fargate this week and I believe it should work just wasn’t sure if you actually got it working or hit any issues

@btotharye @KarthiAru I was able to deploy using AWS Elastic Beanstalk with the below Dockerrun.aws.json; @btotharye I think the task definition for Fargate should be pretty similar, albeit this doesn’t have the VPC set up, it’s just talking within the host itself.

Do note the specified version for the docker image; we needed to stay on a stable version and slowly upgrade through.

This configuration also uses the EB-provided log paths.

{
	"AWSEBDockerrunVersion": 2,
	"containerDefinitions": [
		{
			"name": "rasa",
			"image": "rasa/rasa:1.1.8",
			"essential": true,
			"memory": 1100,
			"memoryReservation": 300,
			"command": [
				"run",
				"-vv",
			],
			"mountPoints": [
				{
					"containerPath": "/app",
					"sourceVolume": "App"
				},
				{
					"containerPath": "/logs",
					"sourceVolume": "awseb-logs-rasa"
				}
			],
			"portMappings": [
				{
					"containerPort": 5005,
					"hostPort": 80
				}
			],
			"links": ["action-server"]
		},
		{
			"name": "action-server",
			"image": "rasa/rasa-sdk:latest",
			"essential": true,
			"memory": 90,
			"memoryReservation": 30,
			"command": ["start", "--actions", "actions"],
			"mountPoints": [
				{
					"containerPath": "/app/actions",
					"sourceVolume": "Actions"
				}
			],
			"portMappings": [
				{
					"containerPort": 5055,
					"hostPort": 5055
				}
			]
		}
	],
	"volumes": [
		{
			"host": {
				"sourcePath": "/var/app/current"
			},
			"name": "App"
		},
		{
			"host": {
				"sourcePath": "/var/app/current/actions"
			},
			"name": "Actions"
		}
	]
}

If you’re looking for a pre-Rasa 1.0 configuration as well, I can provide one that was used and updated through 0.14.5

Also @btotharye I realized I misread that reply, I haven’t been able to figure out how to get Rasa X deployed onto AWS with Fargate, I provisioned an EC2 instance to simply handle all Rasa X related things; if you figure out how to do so, I’d be interested to know how!

Yea I don’t think it will work on Fargate yet due to the storage requirements. So I’ll setup a AWS CDK example for deploying Rasa on a ECS Ec2 setup with EFS and ALB, I have the code already basically done for other apps just need to add the Rasa services to it.

I’ll share it when it’s ready and working, then you are just one command away from a fully functional Rasa stack all via code.

1 Like

Hi @niveK, I am trying to deploy Rasa assistant with Rasa X in AWS using Docker Compose. Can you please help me in understanding how to deploy it without Git integration?

I haven’t made any changes to my current deployment (still running on an instance managed through Elastic Beanstalk). For a Rasa X deployment using Docker Compose, I’d recommend checking out this installation guide.

That being said, I’d recommend creating an EC2 instance and running the server quick install. But you might have some success using EKS and deploying using the Helm Chart installation. Once I make the switch myself, I was hoping of creating a tutorial covering easy pitfalls in AWS.

1 Like