Admin

Software Development

Featured

I Deployed My First App on AWS in 30 Minutes — Here Is Exactly How I Did It (Step-by-Step Tutorial)

After months of running my Node.js app locally, I finally deployed it to AWS EC2. It took me 30 minutes from start to finish. Here is the exact step-by-step process I followed, including every command I ran and every mistake I made along the way.

By Anjali SinghPublished: May 18, 20263 min read6 views✓ Fact Checked
I Deployed My First App on AWS in 30 Minutes — Here Is Exactly How I Did It (Step-by-Step Tutorial)
I Deployed My First App on AWS in 30 Minutes — Here Is Exactly How I Did It (Step-by-Step Tutorial)

I have been building web applications for three years, but I had never deployed anything to a real cloud server. My apps always lived on localhost:3000, and I was honestly terrified of the deployment process. Last week, I finally took the plunge and deployed my Node.js application to AWS EC2. It took me exactly 30 minutes from creating the instance to seeing my app live on the internet. Here is exactly how I did it.

Why I Was Scared of Deployment

If you are like me, you have probably read dozens of deployment tutorials that made the process seem impossibly complex. SSH keys, security groups, Nginx configurations, PM2 process managers, SSL certificates — the list of things you need to know feels overwhelming. I put off deployment for months because I thought I needed to understand everything perfectly before starting. I was wrong. You can learn as you go, and the process is much simpler than it appears.

Step 1: Launch an EC2 Instance (5 minutes)

I logged into the AWS Console, navigated to EC2, and clicked Launch Instance. I chose Ubuntu 22.04 LTS as my operating system because most tutorials use Ubuntu and I wanted to follow along easily. For the instance type, I selected t2.micro which is free tier eligible — perfect for a small app with low traffic. I created a new key pair, downloaded the .pem file, and configured the security group to allow SSH (port 22), HTTP (port 80), and HTTPS (port 443). Then I clicked Launch.

Step 2: Connect via SSH (2 minutes)

Once the instance was running, I copied the public IP address and connected from my terminal. On Windows, I used PowerShell. The command was simple: ssh -i my-key.pem ubuntu@my-ip-address. The first time I connected, I got a permission error because the .pem file had too-open permissions. I fixed it by restricting the file permissions, and then the connection worked perfectly.

Step 3: Install Node.js and My App (10 minutes)

On the server, I installed Node.js using the NodeSource repository. Then I cloned my GitHub repository, ran npm install, and created a .env file with my production environment variables. I tested the app by running node server.js and confirming it responded on port 3000. Everything worked on the first try, which honestly surprised me.

Step 4: Set Up PM2 and Nginx (10 minutes)

I installed PM2 to keep my app running even after I disconnect from SSH. Then I installed Nginx as a reverse proxy to forward traffic from port 80 to my app on port 3000. The Nginx configuration was just a few lines — I copied it from a tutorial and changed the port number. After reloading Nginx, my app was accessible via the public IP address in a browser.

Step 5: Add a Domain and SSL (3 minutes)

I pointed my domain DNS A record to the EC2 IP address, installed Certbot, and ran one command to get a free SSL certificate from Let us Encrypt. Certbot automatically configured Nginx for HTTPS and set up auto-renewal. My app was now live at https://mydomain.com with a green padlock.

What I Learned

The biggest lesson was that deployment is not as scary as I thought. The entire process took 30 minutes, and most of that time was waiting for things to install. If you have been putting off deployment like I was, just do it. Start with a simple app, follow the steps one at a time, and you will have something live on the internet before your coffee gets cold. The confidence boost of seeing your app running on a real server is worth every minute of the learning process.

Anjali Singh

Written By

Anjali Singh

Anjali Singh is the Editor-in-Chief of TechNews Venture with 10+ years of experience in technology journalism. Post Graduate in Technology, she covers AI, cloud computing, cybersecurity, and emerging tech trends.

Sources & References

• Official company announcements and press releases

• Industry reports from Gartner, IDC, and Statista

• Peer-reviewed research and technical documentation

• On-record statements from industry experts

Last verified: May 18, 2026

Fact-checked by TechNews Venture editorial team

Leave a Comment

Comments are moderated and will appear after review.