Simplest way to get data from AWS mysql RDS to AWS Elasticsearch?

Sam Fen picture Sam Fen · Apr 28, 2017 · Viewed 11.9k times · Source

I have data in an AWS RDS, and I would like to pipe it over to an AWS ES instance, preferably updating once an hour, or similar.

On my local machine, with a local mysql database and Elasticsearch database, it was easy to set this up using Logstash.

Is there a "native" AWS way to do the same thing? Or do I need to set up an EC2 server and install Logstash on it myself?

Answer

Val picture Val · Apr 29, 2017

You can achieve the same thing with your local Logstash, simply point your jdbc input to your RDS database and the elasticsearch output to your AWS ES instance. If you need to run this regularly, then yes, you'd need to setup a small instance to run Logstash on it.

A more "native" AWS solution to achieve the same thing would include the use of Amazon Kinesis and AWS Lambda.

Here's a good article explaining how to connect it all together, namely:

  • how to stream RDS data into a Kinesis Stream
  • configuring a Lambda function to handle the stream
  • push the data to your AWS ES instance