Setup Amazon RDS Database for IIoT
The Amazon Relational Database Service (AWS RDS) supports Amazon Aurora, Oracle, MariaDB, PostgreSQL, SQL Server and MySQL. Below are steps to create an AWS account and user if you don’t already have one, create a database on AWS and to configure it correctly for data logging.
Create AWS Account
If you don’t already have an AWS account, you will need to create one. See link below. AWS recommends that you create a separate IAM (AWS Identity and Access Management) user for using their RDS (Amazon Relational Database Service) services. See link below. You can, however, follow this tutorial using the root user account you create(d) during the AWS account setup.
Create AWS Account: https://portal.aws.amazon.com/billing/signup#/start
Create IAM Account: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html#CHAP_SettingUp.IAM
Once you have logged into the AWS console, select Database >> RDS from the Services menu at the top. Next Click on the Create Database button.
Choose the Standard create option under the creation method. Under Engine options, choose your engine.
Under Settings, enter a DB instance identifier, a Master username and a Master password.
Note: For PostgreSQL and Aurora, the username can’t be admin, use postgres. For Oracle, database name must be DATABASE.
Under the Connectivity section, select Yes for Public access.
Click the Create Database button.
Once your database is created, click on the DB identifier in the Database grid to view the details about your new database. Copy down the Endpoint, you will need this later.
Under the Security group rules sections, click on the Security group whose Type is EC2 Security Group – Inbound.
Click on Inbound rules and then Edit inbound rules.
Click Add rule. Change the Type to All traffic in the dropdown and the Source to My IP. Click Save rules.
Note: for SQL Server and PostgreSQL, you don’t have to create the database first. For MariaDB you need to ‘GRANT ALL PRIVILEGES’ to the admin user after you have created the database.