Skip to main content

Amazon RDS MySQL

This guide contains the required information to set up an Amazon MySQL Sink in Vanus Connect.

Introduction

MySQL is a popular open-source relational database management system to store, organizes, and retrieves data for websites, applications, and other software.

Vanus Connect's AWS MySQL sink connector simplifies transferring data/events from various sources to a MySQL database/table, with configurable filters and upsert/insert modes.

Prerequisites

Before forwarding events to MySQL, you must have:

Getting Started

Step 1: Set Up a MySQL Server in AWS Using RDS

  1. Log in to the AWS Management Console using your root account credentials.

  2. Type RDS① in the search box and select RDS② from the results.

aws-mysql-sink-1

  1. Click the Region name③ to open the dropdown menu and select the particular Region④ in which you want to create the DB instance.

aws-mysql-sink-2

  1. Click Create database⑤.

aws-mysql-sink-3

  1. Select Standard create⑥ and choose the MySQL⑦ icon.

aws-mysql-sink-4

  1. Select the Free tier⑧ Template for testing, or opt for one of the other available options based on your specific use case.

aws-mysql-sink-5

note

Multi-AZ DB⑨ deployment is only available for the paid tier. A Multi-AZ deployment automatically provisions and maintains a synchronous standby replica in a different Availability Zone.

  1. Enter the following information.

aws-mysql-sink-6

  • DB instance identifier⑩: Give a unique name to your instance.

  • Master username⑪: This is the username that will be used to log in to your DB instance.

  • Master password⑫: This is the password that will be used to log in with the username.

  • Confirm master password⑬: Write the password again.

  1. Select the General Purpose SSD (gp2)⑭ storage type. It's efficient and cost-effective for our intended use.

aws-mysql-sink-7

  1. Enable Public access⑮.

aws-mysql-sink-8

note

This allocates an IP to your database instance and allows direct connection to the database from the internet.

  1. Select Create new⑯ to create a new VPC security group, then specify your New VPC security group name⑰.

aws-mysql-sink-9

  1. Select Password authentication⑱.

aws-mysql-sink-10

note

Leave Enable Enhanced monitoring⑲ unchecked to stay within the free tier limit.

  1. Input an Initial database name⑳, and set your preferred Backup retention period㉑.

aws-mysql-sink-11

  1. Click the Create database㉒ button to complete the process of creating your database.

aws-mysql-sink-12

Step 2: Modify Your VPC Security Groups

  1. Click on the Database① you just created in AWS RDS.

aws-mysql-sink-13

  1. Within the Connectivity & security② section, click on your VPC security group③.

aws-mysql-sink-14

  1. Within the Inbound rules④ section, click the Edit inbound rules⑤ button.

aws-mysql-sink-15

  1. Click on the source field⑥ and choose My IP⑦ to allow connectivity exclusively from your IP address, then click Save rules⑧ to save your settings.

aws-mysql-sink-16

note

Alternatively, you can opt for Anywhere-IPv4 to enable traffic from any IPv4 address.

Now you can connect to your server and create a table.


Step 3: Amazon RDS MySQL Connection Settings

To set up Amazon RDS MySQL Sink in Vanus Connect:

  1. Return to the RDS page and click on the database① you just created.

aws-mysql-sink-17

  1. Copy your Endpoint & port②.

aws-mysql-sink-18

  1. Navigate to the Vanus Cloud platform and fill in the following credentials.

aws-mysql-sink-19

  • Host③: This is your RDS endpoint.
  • Port④: Enter the port number on which your MySQL server is listening. The default port for MySQL is 3306.
  • Username⑤: Master username selected during the database creation.
  • Password⑥: User password.
  • Database⑦: The initial database name.
  • Table⑧: The name of the table you want your events to be sent to.
  • Choose the Insertion Mode⑨.

Step 4: Personalize Event Structure

note

This is a general instruction on how to personalize your event structure. You can structure your events to suit your specific requirements and create connections for different scenarios.

  1. Click on Display sample events① for reference and click on Add More② to add events.

aws-mysql-sink-20

  1. Input key③ and search for the corresponding value④ for the event you want.

aws-mysql-sink-21

  1. You can fill in as many key-value pairs⑤ as you wish to receive. And then click Submit⑥ to finish the configuration process.

aws-mysql-sink-22


Custom Connection

The event data must be in JSON format and created following the structure of your database, here's an example:

{
"title": "value",
"date": "value",
"ect...": "value"
}