---
updatedAt: 2025-07-15T08:41:19.000Z
agentTools:
  projectIndex: https://docs.appery.io/llms.txt
---

# Amazon AWS RDS

Connecting to Amazon RDS service.

# Introduction

In this tutorial, you’ll learn how to create an account with the Amazon web service (AWS), set up your external relational database and connect it for using with [Appery.io](https://appery.io) **[API Express](https://appery.io/apiexpress)**.

# Creating *Amazon AWS Account*

1. Open the link – [https://aws.amazon.com](https://aws.amazon.com/).
2. Click **Create a Free Account** and complete the registration.

> 📘 Appery.io API Express: How to Set Up and Connect a Relational DB into Your Project
>
> You can also check this video for instructions on how to:
>
> 1. Set up a relational database using Amazon Web Services
> 2. Create a db table and populate it with data using pgAdmin software.
> 3. Create and define the database connection and generate and test an API express service to expose the DB data.

<HTMLBlock>{`
<iframe width="610" height="315" src="https://www.youtube.com/embed/hHy4xBncZqM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
`}</HTMLBlock>

# Creating *Database*

1. After your registration has been completed, you can login with your account on the main page.\
   After successful login, you’ll get access to the Amazon Web Services console.
2. Select **Database > RDS**:

<Image align="center" className="border" border={true} src="https://files.readme.io/4e4ceaf-03-20_22.50..png" />

3. On the next page, click **Create database**:

<Image align="center" className="border" border={true} src="https://files.readme.io/9b0ebc7-03-21_20.24..png" />

4. Choose the ***Standard create*** database creation method.
5. For **Engine options**, select ***PostgreSQL*** and the ***PostgreSQL 13.4-R1*** version:

<Image align="center" className="border" border={true} src="https://files.readme.io/5a67dc8-03-21_20.27..png" />

6. Keep the ***Production*** template selected.
7. In the **Availability and durability** section, choose ***Single DB instance***.
8. Then, type a name for your DB cluster.
9. Under **Credentials Settings**, enter the master password and confirm it:

<Image align="center" className="border" border={true} src="https://files.readme.io/5419f57-03-21_20.43..png" />

10. In the **DB instance class** section, choose ***Burstable classes***. In this example, we will use `db.t3.micro`. Also, enable the ***Include previous generation classes*** toggle:

<Image align="center" className="border" border={true} src="https://files.readme.io/5fbb8f9-03-21_20.50..png" />

11. In the **Storage** section, select the ***General Purpose SSD (gp2)*** option and disable the ***Enable storage autoscaling*** check box:

<Image align="center" className="border" border={true} src="https://files.readme.io/9deb80b-03-21_20.51..png" />

12. In the **Connectivity** section, select ***Create new VPC***, set the **Public access** option to ***Yes***; for the **VPC security group**, enable ***Create new*** and enter the **New VPC security group name** = ***db***:

<Image align="center" className="border" border={true} src="https://files.readme.io/fc0363d-03-21_20.53..png" />

13. Unfold the **Additional configuration** section, for **Initial database name**, enter ***db1*** and then disable the following options:

* ***Enable automated backups***
* ***Enable encryption***
* ***Enable Performance Insights***
* ***Enable Enhanced monitoring***
* ***Enable deletion protection***:

<Image align="center" className="border" border={true} src="https://files.readme.io/0b427b1-03-21_20.59..png" />

> 🚧 Note!
>
> **Additional configuration** settings depend on your development and budgeting needs and may vary.

11. Click **Create database**:

<Image align="center" className="border" width="smart" border={true} src="https://files.readme.io/4a83eb7-03-21_21.01..png" />

12. Now, you can review your AWS database:

<Image align="center" className="border" border={true} src="https://files.readme.io/086ace1-03-21_21.22..png" />

13. Select the database, scroll down to the **Security group rules** section, and then choose ***Inbound*** for the first security group:

<Image align="center" className="border" border={true} src="https://files.readme.io/ce4a964-03-21_21.220..png" />

14. Now, let’s click it to review the security group:

<Image align="center" className="border" border={true} src="https://files.readme.io/4ba0733-03-21_21.220..png" />

15. Select the ***db*** security group in the **Inbound rules** tab and then click the **Edit inbound rules** button:

<Image align="center" className="border" border={true} src="https://files.readme.io/cebeaa1-03-21_21.14..png" />

16. Choose the ***Anywhere-IPv4*** option for its source and then click **Save rules**:

<Image align="center" className="border" border={true} src="https://files.readme.io/b0e035c-03-21_21.16..png" />

You should receive the confirmation message stating that your inbound security group rules have been successfully modified.

> 🚧 Important!
>
> Note that account settings are region-dependent.\
> In our example, we were using the ***us-east=1*** region but you might need to modify them according to your region:

<Image align="center" className="border" border={true} src="https://files.readme.io/f7cc2ef-03-22_20.02..png" />

# Creating *Database Table*

Now, to start working with **[API Express](https://appery.io/apiexpress)**, we need to create a table(s) by using special database tools.

1. Let’s take, as an example, **pgAdmin**: <https://www.pgadmin.org/download/> and save it to the drive.
2. Install it and run on your machine.
3. On the main app page, click **Add New Server**:

<Image align="center" className="border" border={true} src="https://files.readme.io/e9bebdf-03-21_21.50..png" />

4. Under the **Connection** tab, enter the server name: ***aws\_test***:

<Image align="center" className="border" border={true} src="https://files.readme.io/b79531c-03-21_21.52..png" />

5. After that, click the **Connection** tab and enter the host name/address obtained from the Amazon database ***Endpoint***, **Maintenance database** = ***db1***, **Username** = ***postgres***, **Password**, then enable the **Save password?** toggle and then click the **Save** button:

<Image align="center" className="border" border={true} src="https://files.readme.io/a7c82b1-03-21_21.55..png" />

> 📘
>
> Host name/address can be found in the AWS database **Connectivity & security** section as the Amazon database ***Endpoint***:

<Image align="center" className="border" border={true} src="https://files.readme.io/5aca72e-03-21_21.47..png" />

6. In the ***aws\_test*** tree, click **Databases > db1> Schemas > Tables**, then right click **Create > Table**:

<Image align="center" className="border" border={true} src="https://files.readme.io/e3d037c-03-21_22.11..png" />

7. Right-click on **Tables**, then select **New Table**.
8. In the new window, enter the table name, for example, **\*test** and switch to the **Columns** tab:

<Image align="center" className="border" border={true} src="https://files.readme.io/f8051c5-03-22_10.47..png" />

9. Add the columns to your table by clicking the **+** button and defining their names and types.\
   In our example, we add two columns: (**id** of the ***serial***  data type (will automatically be modified to ***integer***) and **name** of the ***character varying*** data type  with **Length/Precision** value set to ***100***). Also, enable the **Not Null?** and **Primary key?** toggles for the **id** column:

<Image align="center" className="border" border={true} src="https://files.readme.io/4d6e9bb-03-22_18.36..png" />

11. Click **Save**: a new table appears on the list:

<Image align="center" className="border" border={true} src="https://files.readme.io/205da2e-03-21_22.20..png" />

# Filling *Table* with Data

Let’s add some data to the table.

1. In the **pgAdmin** application, right-click on the table (here it’s the **test** table), then select **View/Edit Data**, and then **All Rows**:

<Image align="center" className="border" border={true} src="https://files.readme.io/cd5d38f-03-21_22.22..png" />

2. In the new page, enter some data into the fields provided and click the **Save Data Changes** button:

<Image align="center" className="border" border={true} src="https://files.readme.io/c0eba0f-03-22_18.31..png" />

> 📘 Primary Key
>
> Make sure that the table has a primary key defined.

Now, when we have a table filled in, let’s create an **[API Express project](https://docs.appery.io/docs/apiexpress-project)** to check how our model works.

## Configuring *Firewall Rules*

Please note, that you might need to follow the steps in [Exposing Your Database to API Express](https://docs.appery.io/docs/apiexpress-database-connection#section-exposing-your-database-to-api-express) to configure firewall rules.

# Adding *Database Connection* to **API Express**

1. In the Appery.io **[Visual Builder](https://docs.appery.io/docs/apperyio-visual-builder)**, go to the **[API Express](https://appery.io/apiexpress/)** tab.
2. There, click **Create new DB connection**, fill in all the required information: enter the connection name, select ***Relational database*** for **Connection type**, and, for **Database type**, select **PostgreSQL**. For **Host**, enter the Amazon database ***Endpoint*** that can be found in the AWS database **Connectivity & security section** (see *Step 5* in the **[Creating Database Table](https://docs.appery.io/docs/amazon-aws-rds#creating-database-table)**.
3. Also, enter the database name (***db1***), Username (***postgres***), and the password.
4. To ensure it works correctly, click **Test**:

<Image align="center" className="border" border={true} src="https://files.readme.io/a86c0e6-03-21_22.36..png" />

5. Then click **Save**.
6. Now, let’s create a new project: under the same **[API Express](https://appery.io/apiexpress/)** tab, click **Create new project**, enter its name, for example ***AmazonTestProject***, and click **Create**:

<Image align="center" className="border" border={true} src="https://files.readme.io/8b7dea4-03-21_22.44..png" />

7. Open the project and click the **new service** link:

<Image align="center" className="border" border={true} src="https://files.readme.io/cd60720-03-21_22.45..png" />

8. In the new window, enter the service name, select the connection and table, then click the **Generate service** link:

<Image align="center" className="border" border={true} src="https://files.readme.io/3c4add0-03-21_22.48..png" />

9. The model is saved and can now be tested under the **[API Express](https://appery.io/apiexpress)** menu:

<Image align="center" className="border" border={true} src="https://files.readme.io/d07a595-03-22_18.34..png" />