# Postgres Integration

### Objective <a href="#toc46444535" id="toc46444535"></a>

Amazon Aurora, a cloud-based relational database, offers compatibility with PostgreSQL. This guide helps you connect quickly and implement various methods to extract data. Learn how simple it is to integrate an external database such as Amazon Aurora with ixHello.

For an introduction to Amazon Aurora, you can refer to the [official documentation.](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)

### Pre-requisites <a href="#toc46444536" id="toc46444536"></a>

* **An active AWS-Account**

You should have an active AWS-Account. If you do not have it, you can create an AWS account at <https://portal.aws.amazon.com/billing/signup#/start>

* **At least one Amazon Aurora Instance**

If you do not have any Aurora DB instance, you can create one quickly.

* Login to AWS Management Console at <https://console.aws.amazon.com/>
* In the Search bar, enter **Aurora.**
* Select **Aurora and RDS**
* Scroll down and select **Create Database**

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FlcH9ktYCPxFzNbPILeup%2Fimage.png?alt=media&#x26;token=a2bd87b1-2251-4e5c-bd6c-0b37bb11fd89" alt=""><figcaption></figcaption></figure>

On clicking **Create database**, you will be redirected to the Engine options screen. Select **Standard Create** and **Amazon Aurora (PostgreSQL Compatible)**.&#x20;

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F0Nd4745pb5xtb3kBmJ3u%2Fimage.png?alt=media&#x26;token=f8184b20-ad78-47af-8634-6756ecec2615" alt=""><figcaption></figcaption></figure>

Enter the credentials. The remaining information is generated automatically. Click "Create Database" to proceed.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F4I5gfdaiLvevkEb0canM%2Fimage.png?alt=media&#x26;token=3ea9c659-6ff8-43de-ac55-25b6cdafcbf5" alt=""><figcaption></figcaption></figure>

The Aurora Instance should support remote connection, which can be done by making it publicly accessible.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FwHgEYvJ1qHqolfkeSrG6%2Fimage.png?alt=media&#x26;token=66fe1669-bff1-4a93-a61b-e6f4c8e0b249" alt=""><figcaption></figcaption></figure>

After clicking "Create Database," you'll be taken to the Database Screen, where you can view the list of created databases.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FXHeNJrBRfokLcbqvocGJ%2Fimage.png?alt=media&#x26;token=a2099673-88f4-4086-941a-af3672a363ed" alt=""><figcaption></figcaption></figure>

Select the newly created database to view all the essential keys and information required for connecting to iX Hello.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FuGZAyyLiI3hWYhlbOjCW%2Fimage.png?alt=media&#x26;token=992266fb-3906-4973-a24c-2d6b920cf7b8" alt=""><figcaption></figcaption></figure>

### **Setup connection to PostgreSQL.** <a href="#hlk56341408" id="hlk56341408"></a>

* Login to the iX Hello portal at <https://bots.ixhello.com>
* Click on the Studio Mode link at the Top of the page:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FVXf97UzwWyMYOL2lAtIY%2Fimage.png?alt=media&#x26;token=0496e933-0d5b-4bcd-95a7-56e187429385" alt=""><figcaption></figcaption></figure>

Browse to: **Integration** > **Connect System** as shown below. Click **Add New Connection**.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FCNeMXYGqnMUgbjJNy6tH%2Fimage.png?alt=media&#x26;token=49291367-706e-4b94-8b0c-6b0eff76a114" alt=""><figcaption></figcaption></figure>

From the dropdown list, select **PostgreSQL** and press **Next**

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FiB6bc33PyEKH6K97yA0d%2Fimage.png?alt=media&#x26;token=ba0099d8-ef04-4e14-997c-de1f8d590be5" alt=""><figcaption></figcaption></figure>

Fill out the Configuration screen, The table below explains each of the inputs shown on this screen.

| Input                 | Information                                                                                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Service Instance Name | You can give any value of your choice.                                                                                         |
| Username              | Username for PostgreSQL connection. Ensure this user has appropriate permissions                                               |
| Database Name         | The name of the Database that you want to connect to.                                                                          |
| Host                  | Host  Name or IP address of the Postgre SQL server. If your server is not using default port, specify it too. eg. x.x.x.x:5432 |
| Port                  | PostgreSQL port number (default is 5432)                                                                                       |

Fill the required information and click on **Validate and Connect.** If the details are correct, the integration will be saved, and you will be redirected back to the integrations listing page.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FQuuHao3FzQFZoygxDBrg%2Fimage.png?alt=media&#x26;token=4124219f-113b-49e2-830c-3c2d3ae05fdf" alt=""><figcaption></figcaption></figure>

After the validation process finishes and the connection to PostgreSQL is established, a confirmation message will indicate the connection's success.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FZccydFSt1zC1gB1zeEca%2Fimage.png?alt=media&#x26;token=5f905fcc-b723-4649-b493-b3ff24e08e04" alt=""><figcaption></figcaption></figure>

**Congratulations, you have successfully integrated PostgreSQL to iX Hello!**
