Trained Model Deploy on S3

We want Train model in RASA and should be deploy at AWS s3 . How this is possible through configuration files.

The easiest way to implement the push would be using a shell script and the AWS cli:


AWS_BUCKET_NAME=<your_s3_bucket_name>

# Train the model
rasa train

# Change into models directory
cd models 

# Get the last modified file in the directory
FILENAME=$(ls -t | head -n 1)

# Copy file to S3
aws s3 cp $FILENAME s3://$AWS_BUCKET_NAME

For the pull, you can use the following shell script:


AWS_BUCKET_NAME=<your_s3_bucket_name>

# Get latest file from S3 bucket
FILENAME=$(aws s3 ls $AWS_BUCKET_NAME --recursive | sort | tail -n 1 | awk '{print $4}')

# Pull that file
aws s3 cp s3://$AWS_BUCKET_NAME/$FILENAME ./$FILENAME

rasa run

Great Idea. Bur some how is this possible to put AWS S3 configuration in config.yml and run this ?

No, there is no way to handle this through the configuration file without modifying the source code.