You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing docs@inductiveautomation.com.
Version:
Supplemental Videos
LESSON
Connecting to an AWS RDS Database
Description
Learn how to connect Cloud Edition to an RDS database in AWS.
Video recorded using: Ignition 8.3
Transcript
(open in window)[00:00] In this lesson, I'll demonstrate how to connect to an AWS RDS Aurora database from Ignition running in an EC2 instance. I already have Ignition installed in an EC2 instance, and its VPC has already been set up to accept incoming HTTP connections. To see how I set this up, you can refer to the Ignition AMI video. To start, from the Aurora and RDS dashboard, I'll click create database. For my database creation method, I'm gonna choose Standard Create instead of Easy Create, and the reason for this is it'll give me the ability to specify more configuration options, such as an initial database name. Next, I can pick my database engine From the options listed here, I'll leave mine on the Aurora engine that's compatible with Postgres, and I'll scroll down. For my template, I'm gonna choose Dev/Test, but if you're setting up a production database, you can keep that selected. Under settings, I'll need to specify a DB cluster identifier, which is how I'll identify this database in AWS. I'm just gonna prepend some text to make it clear what it's for.
[01:07] I'll leave the master username as postgres, and I'll specify a master password. If you provide your own password, make sure that you don't forget it as you'll need it later. For the instance configuration, I'm gonna leave the default values, but you can change these options to choose a capacity that meets the needs of your system. Next, I'll scroll down to connectivity. I'm gonna click this radio button to connect to an EC2 compute resource, and then this dropdown appears and I can see my running instances and select my instance running Ignition. This will cause my database to automatically get added to the Ignition VPC. I'll let it automatically set up a DB subnet group. However, under VPC Security group, I'm gonna choose the Ignition security group that was created with my VPC stack. If you click additional configuration here, you can see that the default database port is 5432, and you can change that if you want. Next, I'll scroll all the way down to additional configuration, expand this, and this is where I can specify an initial database name.
[02:06] Note that they say Amazon RDS does not create a database if nothing is specified here, but we'll need an initial database to exist to create our connection from Ignition. I'll name this Ignition and take a note of it as I'll need to remember it when I create my connection in my instance. Once I've done that, I'm gonna leave everything else as the default value and scroll down to the bottom and click Create database. It might take some time to create the database, so I'll cut forward to it being ready. Once my database is up and running, I'll click on the database instance and copy the endpoint. Now I can head over to my gateway webpage for my Cloud Edition installation. I'll navigate to connections, databases, and connections, and click create database connection. The Aurora DB engine I chose is compatible with PostgreSQL, so I'll choose that driver. I'll call this "AuroraPostgres". The master username was postgres, so I'll type that in and then I'll supply the password as well.
[03:09] I'll overwrite localhost in the Connect URL with the endpoint I just copied from AWS. Then I left the database port at 5432, but I named the initial database ignition, so I'll need to replace that. Then I can scroll down and create the connection. The connection will say valid, and now I'm ready to start storing and retrieving data from my cloud database.