Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 271
Sam Fen Avatar asked Apr 28 '17 20:04

Sam Fen


People also ask

How do I transfer my RDS to AWS?

Short description. You can't transfer resources between accounts. However, you can migrate Amazon RDS resources to another account. By sharing cross-account snapshots, you can share snapshots of an unencrypted DB instance with a specific account, or you can make snapshots public.


Video Answer


1 Answers

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
like image 66
Val Avatar answered Sep 18 '22 08:09

Val