Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

My First Time Putting an App on AWS (A Beginner's Story)

Today I did something I've wanted to do for a while — I took an app running on my own laptop and put it "live" on the internet using AWS. It sounds scary when you read about it online, but once I actually did it, it was just a bunch of small, simple steps, one after another. This post is me writing down everything I did, in plain, easy words, so that if you're a beginner like me, you can follow…

I decided to put my laptop-based app on the internet using AWS, despite the intimidating reputation it often has. I broke down the process into simple steps, explaining each one clearly so beginners can follow along without getting overwhelmed by technical jargon. AWS, short for Amazon Web Services, is essentially renting out Amazon's servers over the internet.

Instead of owning and maintaining physical servers at home, users rent virtual computers from Amazon to run their applications, accessible to anyone with internet access. I chose EC2 (Elastic Compute Cloud), a service that provides virtual computers managed by AWS, for my needs. The first step involved setting up IAM (Identity and Access Management) to control who could interact with my account and resources.

This is akin to giving someone a spare key instead of the master key, ensuring better security. After securing IAM, I launched an EC2 instance, which is essentially a virtual computer in AWS's data center, giving me control over it like my own machine. To access this server from my laptop, I downloaded and stored a .pem file, acting as a digital key to the server.

Using SSH (Secure Shell) with this key, I connected to the server, effectively placing my laptop inside the AWS computer. The next step was updating the server with `sudo apt update`, which checks for and installs the latest software versions, ensuring everything is up-to-date. Then, I installed necessary dependencies, which are additional tools and programs my app requires to run, akin to installing a game console before playing a video game.

I then cloned my app's code from GitHub to the server using `git clone`, bringing all the necessary files onto the AWS server. To keep sensitive information safe, I created a `.env` file, a secret settings file that stores passwords, API keys, or database links. I created this file using `touch .env`, verified its creation with `ls -a`, and edited it using Vim, a terminal-based text editor.

Finally, I configured port 3000 to be accessible from outside the server by adding an inbound rule in AWS's Security Group settings, effectively unlocking the server's door for external access. After completing all these steps, simply typing `http://your-instance-public-dns:3000` in a browser displayed my app running live on the internet, fulfilling the goal of bringing a laptop-based app to the web through AWS.

The entire process, though initially daunting, proved manageable once broken down into clear, sequential steps.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Build a POS receipt printer in Node.js

Disclosure: I build Receiptful, the printing API used in this tutorial. The Node and Express parts apply whatever you print with.

  • Node.js service created for POS receipt printing
  • Printer identified by printer ID and API key
  • Order data rendered as HTML for custom layout
US-China tech war is coming for AI’s plumbing

US-China tech war is coming for AI’s plumbing

The US Federal Communications Commission (FCC) is reportedly considering a ban on Chinese optical transceivers, signalling that the US-China tech war is expanding beyond the focus on semiconductor chips to shadow even the smallest link in the chain of essential artificial intelligence (AI) hardware.

More from Sunday 16 August →