惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
博客园_首页
爱范儿
爱范儿
博客园 - 叶小钗
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
Y
Y Combinator Blog
量子位
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Blog of Author Tim Ferriss
月光博客
月光博客
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
i touched AWS and stuff didn't break (mostly)
Ansh Dhanani · 2026-05-27 · via DEV Community

so. i finally sat down and actually did AWS. not just watched tutorials, not just read docs actually clicked buttons, broke things, fixed them, and now i have opinions.

this is a writeup of everything i learned practically in this last 1 week, in the order i learned it, with zero fluff. if you're someone who learns by doing and wants a no-nonsense walkthrough of core AWS concepts you're in the right place.

let's go.


spinning up my first EC2 instance

EC2 is basically "rent a computer from Amazon and it runs 24/7 somewhere in a data center." that's the whole thing. everything else is just configuration.

i launched a t3.micro in ap-south-1 (Mumbai) free tier, which is perfect for learning. named it my web server because i'm creative like that.

what actually matters when launching: the AMI (think: OS), the instance type (think: hardware specs), and your key pair (SSH access). everything else can be changed later. don't overthink it.

once it's running, you get a public IPv4. EC2 Instance Connect lets you SSH directly from the browser which is actually very clean for beginners. no terminal setup needed.

one thing that tripped me up the instance showed "Running" but that doesn't mean your application is running. the VM is up, your code is not. different things.


deploying a "website" (lol)

my first deployed website on AWS was literally this:

Hi, i am Ansh. and this is my first AWS based self deployed website. WOHOOOO!!! let's gooo!!!

Enter fullscreen mode Exit fullscreen mode

one line of HTML. serving it with nginx. accessible on port 80 over HTTP. it's terrible and i loved it.

hitting that raw IP in the browser and seeing that text load that was a real moment. first cloud-deployed thing i've ever built. it's plain text and i don't care, it counts.

the actual commands to get Apache running:

# update, install, start
sudo apt-get update -y
sudo apt-get install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx

# drop your HTML here
sudo nano /var/www/html/index.html

Enter fullscreen mode Exit fullscreen mode

that's literally it. the web server is now live. the hard part was not the code it was getting the networking right, which brings us to...


security groups - what even is a port?

security groups are basically firewall rules for your EC2 instance. when i first tried hitting my instance's IP in the browser, nothing loaded. timeout. because i hadn't opened port 80 (HTTP).

i set up a security group called ssh-http-web-secgrp with two inbound rules:

1. SSH on port 22 so i can connect to the instance via terminal. source: 0.0.0.0/0 (anywhere) for learning, should be your IP in prod.

2. HTTP on port 80 so the world can access the web server. source: the load balancer's security group, not the open internet.

actually important thing: security groups are stateful if you allow inbound on port 80, the response traffic goes out automatically. you don't need a matching outbound rule. this confused me for a bit.


load balancer + two instances

this is where things got interesting. i spun up two EC2 instances web-1 and web-2 both running nginx, both in ap-south-1 but in different availability zones (ap-south-1c and ap-south-1a).

internet
    ↓
ALB: web-auto-scale-1  (internet-facing · application)
    ↙            ↘
web-1            web-2
ap-south-1c      ap-south-1a
13.200.143.71    13.200.250.228

Enter fullscreen mode Exit fullscreen mode

the load balancer (ALB = Application Load Balancer) sits in front of both. traffic hits the ELB DNS name, it routes to whichever instance is healthy. hitting the ALB URL shows the nginx default page because both instances are healthy and serving traffic.

the ALB had its own security group (LB-SG) that only allowed HTTP traffic, and the EC2 security group was configured to only accept HTTP from the LB-SG. proper layering.

why two AZs matter: if ap-south-1c goes down (data center fire, power, whatever), ap-south-1a is still up. your site stays live. this is the whole point of availability zones. use them.


stress testing my own server (intentionally)

once i had CloudWatch monitoring set up, i wanted to see the CPU spike. so i SSH'd into web-1 and did something slightly chaotic:

# install the stress tool
sudo apt-get install stress -y

# hammer 2 CPUs for 600 seconds in the background
stress --cpu 2 --timeout 600 &

# more
stress --cpu 1 --timeout 600 &

# even more
stress --cpu 2 --timeout 60

Enter fullscreen mode Exit fullscreen mode

then i opened the CloudWatch monitoring tab and watched the CPU utilization graph spike in real time. went from near 0% to peaking hard. network in/out graphs lit up too.

this is the kind of thing that makes auto scaling make sense. in a real setup, you'd have a scaling policy: "if CPU > 70% for 2 minutes, launch another instance." i had the infra for it the Auto Scaling Group and load balancer were ready. the scaling policies are the next thing i'm wiring up.

what monitoring taught me: CloudWatch metrics are per-instance. the load balancer has its own monitoring tab (target response time, request count). look at both. the LB view shows what users experience; the instance view shows what's happening inside.


IAM - learning what "not authorized" feels like

IAM (Identity and Access Management) is AWS's permission system. users, roles, policies. this one bit me directly.

i was poking around with a second AWS account and tried to view EC2 instances in eu-north-1 (Stockholm). got this:

You are not authorized to perform this operation.
User: arn:aws:iam::590128028909:user/Ansh-2 is not authorized
to perform: ec2:DescribeInstances because no identity-based
policy allows the ec2:DescribeInstances action

Enter fullscreen mode Exit fullscreen mode

makes total sense in hindsight. the user had no IAM policies attached. by default in AWS you get nothing. zero permissions. you have to explicitly grant everything.

this is the opposite of how most beginners think about it. they expect "allow everything by default, block what's dangerous." AWS does "block everything by default, allow what you need." way more secure.

the IAM mental model:

  • root account = god mode. don't use it for daily stuff.
  • IAM user = a specific identity with attached policies.
  • policy = JSON document saying "this action on this resource is allowed/denied."
  • role = like a user but assumed temporarily (e.g., an EC2 instance acting as a user to access S3).

the ARN (Amazon Resource Name) in that error message is how AWS identifies every resource uniquely. arn:aws:iam::590128028909:user/Ansh-2 account ID, service, resource. you'll see ARNs everywhere.


S3 - storing stuff in the cloud like a normal person

S3 (Simple Storage Service) is object storage. not a file system, not a database a bucket that holds objects (files). infinitely scalable, stupidly cheap, and the backbone of half the internet.

i created a bucket called first-s3-bucket-by-ansh in ap-south-1 and uploaded one image:

maykl-dzhekson-michael-jackson.jpg  ·  62.2 KB  ·  Standard storage class

Enter fullscreen mode Exit fullscreen mode

(yes that's how it was spelled. yes i kept it.)

first attempt to access it via the public URL, got this:

<Error>
  <Code>AccessDenied</Code>
  <Message>Access Denied</Message>
</Error>

Enter fullscreen mode Exit fullscreen mode

because S3 buckets are private by default. again AWS defaults to locked down. to make an object publicly accessible you need to:

  1. Disable "Block Public Access" at the bucket level. it's a safety setting that overrides everything.
  2. Add a bucket policy that allows s3:GetObject for Principal: "*" on the objects.
  3. or just hit "Make public" on the individual object. faster for learning, wrong for production.

after sorting that the image loaded. michael jackson silhouette on a black background(btw, I LOVE MICHAEL JACKSON SONGS!), served from my S3 bucket, accessible from anywhere in the world. the URL structure is:

https://[bucket-name].s3.[region].amazonaws.com/[object-key]

Enter fullscreen mode Exit fullscreen mode

S3 is everywhere: static website hosting, ML model weights, application logs, database backups, CDN origin... you'll use S3 in basically every AWS architecture. understand it early.


tldr / what i actually learned

not just "what buttons to click" the mental models that stuck:

AWS defaults to deny. no permissions, no access. you build up from zero. this is good, not annoying.

Availability zones are not optional. run across at least two if anything needs to actually stay up.

Security groups are stateful firewalls. inbound rules are all you need for most setups. outbound is open by default.

Load balancers + auto scaling = resilience. horizontal scaling is the AWS way. don't make your instance bigger, make more of them.

IAM is the foundation. understanding ARNs, policies, and roles unlocks everything else. don't skip it.

S3 is not just file storage. it's an architecture primitive. almost every serious AWS app touches it.


what's next: auto scaling policies that actually trigger (stress test → new instance spins up automatically), RDS for a proper database, CloudFront for CDN, and Route 53 for a real domain instead of raw IP addresses.

also i need to terminate these instances before my free tier runs out.

  • Ansh Dhanani