Deploying AWS FCJ User Management System

AWS FCJ User Management System – Nodejs, Express, AWS RDS PostgreSQL, AWS Secret Manager & Handlebars,

A user management system is a crucial component of many web applications. It allows admin manage their account information. In this tutorial, we will build a simple user management system using Node.js, Express, RDS PostgreSQL, and Handlebars.

  • Node.js is a JavaScript runtime environment that allows us to build scalable and efficient server-side applications.
  • Express is a lightweight web framework for Node.js that makes it easy to develop and maintain web applications.
  • RDS PostgreSQL is a managed database service from Amazon Web Services (AWS) that offers a reliable, scalable, and secure way to run PostgreSQL databases.
  • AWS Secrets Manager is a service that helps you manage secrets, such as database passwords, API keys, and other sensitive information. This makes it easy to keep your secrets safe and secure.
  • Handlebars is a templating engine that makes it easy to generate dynamic HTML pages.

app

Deploy the application

  1. To clone the repository from GitHub, you can use the following command:
    git clone https://github.com/hiepnguyendt/fcj-management-user.git
    

app

  1. Eit file .env with your database credential
    nano .env
    

app

  • AWS_REGION: your region autofetching
  1. Run the code:
    npm start
    

app

Now, you are connecting to RDS PostgreSQL by Auto-fetching instance credentials from AWS Secret Manager.

If you got error when you run code. You should check AWS_regin in the AWS CLI

  1. Go to back pgAdmin4 to query data
  • Create table fcj_user

***You can using following SQL scripts below to create table ***

SQL Scripts

  • Insert data into fcj_user table

***You can using following SQL scripts below to insert data into table ***

SQL Scripts

  1. Check EC2 Instance status: Make sure your EC2 Instance is running and functioning properly.
  • Test the application in the browser: Open a web browser and enter the IP address or domain name of the EC2 Instance, followed by port 5000 (for example: http:// :5000). This will make a connection to your application running on port 5000.

  • Test results: The browser will display your application if everything is configured correctly and the EC2 Instance is working. If not, you need to recheck the previous steps to identify the problem and fix it.

http://<IP address or domain name>:5000

app

Congratulation! You have built AWS FCJ User Management System on Amazon Web Services.