Skip to content

Installation of the DB

Aditya Abeysinghe edited this page Mar 3, 2024 · 1 revision

The Identity Web API uses a SQL Server database hosted in RDS to manipulate client data. The Lambda function created connects with the database in RDS.

Configure the database

  1. Log in to AWS console and search RDS in Services
  2. Click create database and select Standard create in Choose a database creation method
  3. Select Microsoft SQL Server in Engine type
  4. The DB instance identifier should be IdentityPM
  5. Enter a username and a password to connect with the database
  6. In the Virtual private cloud (VPC) select the VPC that was created
  7. Set Public access to Yes
  8. In VPC security group select Create New and enter a name for the security group
  9. Choose create database

    The database that was created can be seen as follows:

instanceofdb

Connect to the database

Enable inbound traffic from SSMS.

  1. Click the database created and navigate to Connectivity & security tab

dbconfigconnectivity1


2. Click the security group in the VPC security groups and click the security group

dbconfigsgroup1


3. Click Edit inbound rules
4. Click Add rule

dbconfigsgroup2


5. Set the values as MSSQL for Type and My IP for Source. Then, click Save Rule.

dbconfigsgroup3


Finally, click the database created and navigate to the Connectivity & security tab. Copy the endpoint.

dbconfigconnectivity4


Open SSMS and set the connection as follows:

  • Server name: (endpoint),(port).
  • Authentication: SQL Server Authentication
  • Username: Username from Configure
  • Password: Password from Configure

Click Connect.



dbconfig


Create schema

Open the DB Creation.sql file.

Click Execute.

Finally, click the database created and navigate to the Connectivity & security tab. Set Public access to No.