[{"data":1,"prerenderedAt":199},["ShallowReactive",2],{"term-e\u002Fec2":3,"related-e\u002Fec2":176},{"id":4,"title":5,"acronym":6,"body":7,"category":154,"description":155,"difficulty":156,"extension":157,"letter":158,"meta":159,"navigation":114,"path":160,"related":161,"seo":169,"sitemap":170,"stem":173,"subcategory":174,"__hash__":175},"terms\u002Fterms\u002Fe\u002Fec2.md","EC2","Elastic Compute Cloud",{"type":8,"value":9,"toc":148},"minimark",[10,15,19,23,26,30,137,141,144],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"EC2 is AWS's way of renting you a virtual computer in the cloud. You pick how powerful it is, what OS it runs, and pay by the hour. It's just a Linux (or Windows) machine you SSH into — except it lives in Amazon's data center. The backbone of most AWS-hosted apps.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Amazon EC2 provides resizable virtual machines in the cloud. You choose instance type (CPU, RAM, GPU), AMI (OS image), storage, and networking. Instances are billed per second. EC2 supports auto scaling, spot instances (discounted), and reserved instances for cost optimization.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Launch an EC2 instance via CLI\naws ec2 run-instances \\\n  --image-id ami-0c55b159cbfafe1f0 \\\n  --instance-type t3.micro \\\n  --key-name my-key-pair \\\n  --security-groups my-sg\n\n# SSH into the instance\nssh -i my-key.pem ec2-user@ec2-12-34-56-78.compute.amazonaws.com\n","bash","",[38,39,40,49,67,78,89,100,109,116,122],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","# Launch an EC2 instance via CLI\n",[41,50,52,56,60,63],{"class":43,"line":51},2,[41,53,55],{"class":54},"sBMFI","aws",[41,57,59],{"class":58},"sfazB"," ec2",[41,61,62],{"class":58}," run-instances",[41,64,66],{"class":65},"sTEyZ"," \\\n",[41,68,70,73,76],{"class":43,"line":69},3,[41,71,72],{"class":58},"  --image-id",[41,74,75],{"class":58}," ami-0c55b159cbfafe1f0",[41,77,66],{"class":65},[41,79,81,84,87],{"class":43,"line":80},4,[41,82,83],{"class":58},"  --instance-type",[41,85,86],{"class":58}," t3.micro",[41,88,66],{"class":65},[41,90,92,95,98],{"class":43,"line":91},5,[41,93,94],{"class":58},"  --key-name",[41,96,97],{"class":58}," my-key-pair",[41,99,66],{"class":65},[41,101,103,106],{"class":43,"line":102},6,[41,104,105],{"class":58},"  --security-groups",[41,107,108],{"class":58}," my-sg\n",[41,110,112],{"class":43,"line":111},7,[41,113,115],{"emptyLinePlaceholder":114},true,"\n",[41,117,119],{"class":43,"line":118},8,[41,120,121],{"class":47},"# SSH into the instance\n",[41,123,125,128,131,134],{"class":43,"line":124},9,[41,126,127],{"class":54},"ssh",[41,129,130],{"class":58}," -i",[41,132,133],{"class":58}," my-key.pem",[41,135,136],{"class":58}," ec2-user@ec2-12-34-56-78.compute.amazonaws.com\n",[11,138,140],{"id":139},"when-youll-hear-this","When You'll Hear This",[16,142,143],{},"\"The app runs on a t3.medium EC2 instance.\" \u002F \"EC2 spot instances are 70% cheaper if you can handle interruptions.\"",[145,146,147],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":149},[150,151,152,153],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":139,"depth":51,"text":140},"cloud","EC2 is AWS's way of renting you a virtual computer in the cloud. You pick how powerful it is, what OS it runs, and pay by the hour.","intermediate","md","e",{},"\u002Fterms\u002Fe\u002Fec2",[162,163,164,165,166,167,168],"AWS","IaaS","VPC","Security Group","Auto Scaling","ECS","Fargate",{"title":5,"description":155},{"changefreq":171,"priority":172},"weekly",0.7,"terms\u002Fe\u002Fec2",null,"hMaha1VCH8J99fazvJop6Cof0p1e1-dsf6krG1dMrIU",[177,180,185,189,192,196],{"title":166,"path":178,"acronym":174,"category":154,"difficulty":156,"description":179},"\u002Fterms\u002Fa\u002Fauto-scaling","Auto scaling is when the cloud automatically adds more servers when traffic spikes and removes them when it drops, so you're not paying for idle machines a...",{"title":162,"path":181,"acronym":182,"category":154,"difficulty":183,"description":184},"\u002Fterms\u002Fa\u002Faws","Amazon Web Services","beginner","AWS is like a giant magical warehouse where you can rent computers, storage, databases, and basically anything tech-related — by the minute.",{"title":167,"path":186,"acronym":187,"category":154,"difficulty":156,"description":188},"\u002Fterms\u002Fe\u002Fecs","Elastic Container Service","ECS is AWS's system for running Docker containers at scale.",{"title":168,"path":190,"acronym":174,"category":154,"difficulty":156,"description":191},"\u002Fterms\u002Ff\u002Ffargate","Fargate is AWS's 'serverless containers' magic. You run Docker containers without ever seeing or touching an EC2 server. AWS figures out where to run them.",{"title":163,"path":193,"acronym":194,"category":154,"difficulty":156,"description":195},"\u002Fterms\u002Fi\u002Fiaas","Infrastructure as a Service","IaaS is when you rent the raw computer hardware in someone else's data center.",{"title":165,"path":197,"acronym":174,"category":154,"difficulty":156,"description":198},"\u002Fterms\u002Fs\u002Fsecurity-group","A security group is a firewall for your cloud resources. You write rules like 'allow port 443 from anywhere' or 'allow port 5432 only from the app servers.",1776518275890]