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

2026年8月16日1 次浏览来源:Dev.to阅读原文

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 along without getting confused by fancy tech terms.

What is AWS, in simple words?

AWS (Amazon Web Services) is basically Amazon renting out computers over the internet.

Instead of buying your own physical server and keeping it running 24/7 at home, you "rent" a computer from Amazon.

That computer runs your app, and anyone with the internet can visit it.

The specific service I used is called EC2.

Think of EC2 as one virtual computer that lives in Amazon's data center, and you get to control it like it's your own.

Step 1: Set up IAM first Before touching any servers, I went to IAM (Identity and Access Management).

This is AWS's way of managing "who is allowed to do what" in your account.

In simple words: instead of using your main AWS login for everything (which is risky), IAM lets you create a separate user with its own permissions.

It's like giving someone a spare key instead of your master key.

I set this up first so my account stays safer.

Step 2: Launch an EC2 instance Next, I went to the EC2 section and launched a new instance (a fancy word for "a virtual computer").

During this step, AWS also lets you create a .pem file — this is basically a secret key file.

It's like a digital key to a lock.

Only someone with this file can get into the server.

I downloaded it and kept it safe, because if you lose it, you can't easily get back in.

Step 3: Login to the server using SSH Once the server (EC2 instance) was ready, I needed a way to "log in" to it from my own laptop.

For that, I used something called SSH, along with the .pem key file I downloaded earlier.

In simple words: SSH is like a secure phone call between your laptop and the AWS server, and the .pem file is the password that proves it's really you calling.

Once connected, my laptop's terminal was now basically "inside" the AWS computer.

Anything I typed from here on ran on the AWS server, not my own laptop.

Step 4: Update the server The very first thing to do on a fresh server is: sudo apt update In simple words: this just checks for the latest versions of software so everything installed after this is up to date.

Think of it like checking for updates before installing new apps on your phone.

Step 5: Install the dependencies Next, I installed the "dependencies" — these are just the extra tools and programs my app needs to actually run (things like Node.js, npm, git, etc., depending on the app).

Without these, the app's code would have nowhere to run, kind of like trying to play a video game without installing the game console first.

Step 6: Bring the code onto the server To get my actual project code onto this AWS server, I used: git clone This downloads a copy of my project (that was sitting on GitHub) directly onto the AWS server.

Now the server has all my app's files.

Step 7: Set up the .env file (the secret settings file) Most apps need some private settings — like passwords, API keys, or database links — that should never be shared publicly on GitHub.

These usually go in a file called .env.

Here's exactly what I did: touch .env This creates a new, empty file named .env. ls -a This lists all files, including hidden ones (files starting with a dot are hidden by default), just to confirm .env was really created. vim .env This opens the file in a text editor called Vim, right inside the terminal.

Inside Vim, I pressed i to switch into "insert mode" (this lets you actually type text — Vim doesn't let you type by default, which confused me at first).

Then I typed in my credentials (my secret settings, like API keys).

After typing everything, I pressed Esc to leave insert mode, then

分享
Baike.dev

baike.dev helps you discover great languages, frameworks, databases, DevOps and cloud-native tools.

Quick links

About

Contribute

Found a great developer tool? Share it with the community.

Submit a tool
© 2026 baike.dev Developer EncyclopediaUpdated daily · Discover great developer tools