<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rajesh</title>
    <description>The latest articles on DEV Community by Rajesh (@rajdevx).</description>
    <link>https://dev.to/rajdevx</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4006757%2F0a1c16ee-8a34-4868-bb0b-9c7e7024b1a6.png</url>
      <title>DEV Community: Rajesh</title>
      <link>https://dev.to/rajdevx</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajdevx"/>
    <language>en</language>
    <item>
      <title>How to Configure Inter-Region VPC Peering</title>
      <dc:creator>Rajesh</dc:creator>
      <pubDate>Fri, 14 Aug 2026 18:26:15 +0000</pubDate>
      <link>https://dev.to/rajdevx/how-to-configure-inter-region-vpc-peering-k36</link>
      <guid>https://dev.to/rajdevx/how-to-configure-inter-region-vpc-peering-k36</guid>
      <description>&lt;p&gt;If you have servers running in different AWS Regions, you may need to allow the workloads on those servers to communicate privately.&lt;/p&gt;

&lt;p&gt;For example, an application running in Hyderabad might need to communicate with a database running in Sydney using private IPs.&lt;/p&gt;

&lt;p&gt;In this how-to, I'll show you how I peered two VPCs in different AWS Regions and connected them using VPC Peering.&lt;/p&gt;




&lt;h1&gt;
  
  
  Architecture
&lt;/h1&gt;

&lt;p&gt;Assume for this lab that the following architecture is required to be configured:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Region A&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hyderabad&lt;/p&gt;

&lt;p&gt;vpc-a-peering-connection (CIDR: 10.0.0.0/16)&lt;/p&gt;

&lt;p&gt;subnet: 10.0.1.0/24&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Region B&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sydney&lt;/p&gt;

&lt;p&gt;vpc-b-peering-connection (CIDR: 10.1.0.0/16)&lt;/p&gt;

&lt;p&gt;subnet: 10.1.1.0/24&lt;/p&gt;

&lt;p&gt;Make sure that the CIDR ranges do not overlap on the VPCs as you can't peer VPCs with overlapping CIDRs&lt;/p&gt;




&lt;h1&gt;
  
  
  1. Creating the VPCs and instances
&lt;/h1&gt;

&lt;p&gt;I first proceeded to create the VPCs and launched instances in them&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigating to Hyderabad region, I created a vpc-a-peering-connection VPC, public subnet, internet gateway, and a route table. Then I launched a simple Ubuntu EC2 instance in the region&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our region A VPC is created:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqdi37xao65sxctz213vw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqdi37xao65sxctz213vw.png" alt="VPC Setup Region A" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The public subnet that I created in Hyderabad region:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fde4wagr7wgnrfmngvgwh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fde4wagr7wgnrfmngvgwh.png" alt="Subnets Region A" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Internet Gateway attached to my Hyderabad VPC:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F77ohibrrs2ws0oeopg5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F77ohibrrs2ws0oeopg5g.png" alt="Internet Gateway Region A" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then switched to Sydney region and created similar resources in that region as well&lt;/p&gt;

&lt;p&gt;The Sydney VPC is created:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgrwj6ixlgu0yj4ymfwln.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgrwj6ixlgu0yj4ymfwln.png" alt="VPC Setup Region B" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The subnet in Sydney region:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6qt3mi94tc19aucapcop.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6qt3mi94tc19aucapcop.png" alt="Subnets Region B" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Internet Gateway attached to my Sydney VPC:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fki3zabumme7qyx5mfj3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fki3zabumme7qyx5mfj3p.png" alt="Internet Gateway Region B" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this lab, I launched my EC2 instances in public subnets so that they can be easily accessed for testing. The VPC peering connection does not require the subnet to be public or VPC to have an Internet Gateway&lt;/p&gt;

&lt;p&gt;At this point, a ping from the Hyderabad instance to the Sydney instance will fail because there is no route between the two VPCs yet.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. Creating the peering connection
&lt;/h1&gt;

&lt;p&gt;Now, I proceeded to create the peering connection&lt;/p&gt;

&lt;p&gt;I navigated to VPC Dashboard in Hyderabad region, clicked Peering connections, and created a new one&lt;/p&gt;

&lt;p&gt;I gave it a name VPC-A to VPC-B, chose my vpc-a-peering-connection as the Requester, and another region as Accepter and Sydney as the region&lt;/p&gt;

&lt;p&gt;I chose the vpc-b-peering-connection as the accepter VPC and clicked create&lt;/p&gt;

&lt;p&gt;The peering connection request was sent and is awaiting approval:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fotilph5h3vg4gynlp15l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fotilph5h3vg4gynlp15l.png" alt="Peering Request Hyderabad" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  3. Accepting the connection
&lt;/h1&gt;

&lt;p&gt;Switching to Sydney region, I navigated to Peering connections and accepted the request:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7saewlvpddlee3ir34p4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7saewlvpddlee3ir34p4.png" alt="Peering Acceptance Sydney" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can now see that the peering connection is active. The next thing to do is to update the route tables&lt;/p&gt;




&lt;h1&gt;
  
  
  4. Updating the route tables
&lt;/h1&gt;

&lt;p&gt;I navigated to Route Tables and selected the route table associated with the subnet where I launched my EC2 Instance&lt;/p&gt;

&lt;p&gt;I added a route to the Sydney VPC:&lt;/p&gt;

&lt;p&gt;Destination: 10.1.0.0/16&lt;/p&gt;

&lt;p&gt;Target: Peering Connection (selected the PCX created earlier)&lt;/p&gt;

&lt;p&gt;I did the same thing in the Sydney region to route traffic back to Hyderabad:&lt;/p&gt;

&lt;p&gt;Destination: 10.0.0.0/16&lt;/p&gt;

&lt;p&gt;Target: Peering Connection&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsimdw32y06mc6jnbf11a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsimdw32y06mc6jnbf11a.png" alt="Route Table Updates Hyderabad" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This route table in Hyderabad now has a route to the Sydney VPC via the peering connection:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb3g67vxcj4i6b8x6hhx7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb3g67vxcj4i6b8x6hhx7.png" alt="Route Table Updates Sydney" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Sydney route table now has a route back to the Hyderabad VPC&lt;/p&gt;




&lt;h1&gt;
  
  
  5. Updating the security groups
&lt;/h1&gt;

&lt;p&gt;The route tables are now updated, but we also need to allow ICMP traffic in the security groups for the ping test to work.&lt;/p&gt;

&lt;p&gt;In the security group of my EC2 instance in Hyderabad region, I updated the Inbound rules to explicitly allow All ICMP - IPv4 from the source 10.1.0.0/16:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxedby4vmtla5k70h61pq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxedby4vmtla5k70h61pq.png" alt="Security Group Inbound Hyderabad" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Note: In the above image, there is a TCP rule from another lab. For ICMP traffic, we need the All ICMP - IPv4 inbound traffic rule)&lt;/p&gt;

&lt;p&gt;Similarly, in the security group in Sydney, I updated the Inbound rules to allow All ICMP - IPv4 from the source 10.0.0.0/16:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjhd6wfm5ffe9ry7buvm8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjhd6wfm5ffe9ry7buvm8.png" alt="Security Group Inbound Sydney" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I explicitly allowed the inbound ICMP rules in Sydney. If you have the default outbound rule (All traffic - 0.0.0.0/0) as Allow, there is no need to add an outbound rule for this ping test&lt;/p&gt;




&lt;h1&gt;
  
  
  6. Testing the connection
&lt;/h1&gt;

&lt;p&gt;I then SSH'd back into my instance in Hyderabad region and did a ping to the private IP address of the instance in Sydney region. It worked after updating the security group:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjl0ac7zgujowl3pbpnud.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjl0ac7zgujowl3pbpnud.png" alt="Successful Ping" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, the two instances can communicate with each other over the AWS network via private IPs&lt;/p&gt;




&lt;h2&gt;
  
  
  Things to note
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You can't establish a VPC Peering connection between VPCs with overlapping IPv4 or IPv6 CIDR blocks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;VPC Peering is not transitive.&lt;/strong&gt; If VPC A is peered with VPC B, and VPC B is peered with VPC C, VPC A cannot communicate with VPC C through VPC B. You need a separate peering connection between A and C. If you have many VPCs, AWS Transit Gateway can provide a centralized way to connect them.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now you know how to configure inter-Region VPC peering. The peering connection provides the path between the VPCs, but you still need the correct route table entries and security group rules on both sides.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>EC2 in Real Life: A Simple Blog Note for Beginners</title>
      <dc:creator>Rajesh</dc:creator>
      <pubDate>Sun, 28 Jun 2026 17:00:33 +0000</pubDate>
      <link>https://dev.to/rajdevx/ec2-in-real-life-a-simple-blog-note-for-beginners-4edd</link>
      <guid>https://dev.to/rajdevx/ec2-in-real-life-a-simple-blog-note-for-beginners-4edd</guid>
      <description>&lt;p&gt;I wrote this like I would explain to a junior in a lab session. No heavy words, no theory overload. Just what matters when you actually create and use an EC2 machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Small intro
&lt;/h2&gt;

&lt;p&gt;When we say "EC2," think of one thing: a computer on rent. You do not buy hardware. You open AWS, pick a machine size, and start using it.&lt;/p&gt;

&lt;p&gt;That is why most people start cloud learning with EC2.&lt;/p&gt;




&lt;h2&gt;
  
  
  1) What is EC2?
&lt;/h2&gt;

&lt;p&gt;EC2 stands for Elastic Compute Cloud.&lt;/p&gt;

&lt;p&gt;Simple meaning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is a virtual server in AWS.&lt;/li&gt;
&lt;li&gt;You can install software in it like your own laptop.&lt;/li&gt;
&lt;li&gt;You can run website, backend API, database, scripts, anything.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why "Elastic"?&lt;br&gt;
Because you can scale up or down based on traffic.&lt;/p&gt;

&lt;p&gt;If today only 10 users come, small server is enough.&lt;br&gt;
If tomorrow 10,000 users come, you can move to bigger machine or add more machines.&lt;/p&gt;


&lt;h2&gt;
  
  
  2) EC2 pricing model (the part everyone asks first)
&lt;/h2&gt;

&lt;p&gt;AWS gives multiple payment options. Choose based on your situation.&lt;/p&gt;
&lt;h3&gt;
  
  
  On-Demand
&lt;/h3&gt;

&lt;p&gt;Use and pay. No long commitment.&lt;br&gt;
Best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learning&lt;/li&gt;
&lt;li&gt;Demo&lt;/li&gt;
&lt;li&gt;Testing new features&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Reserved Instances
&lt;/h3&gt;

&lt;p&gt;You commit for long term (usually 1 or 3 years).&lt;br&gt;
Cost is lower than on-demand.&lt;br&gt;
Best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stable production apps&lt;/li&gt;
&lt;li&gt;Predictable workloads&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Spot Instances
&lt;/h3&gt;

&lt;p&gt;Very cheap (sometimes huge discount), but AWS can reclaim it.&lt;br&gt;
Best for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Batch jobs&lt;/li&gt;
&lt;li&gt;Video processing&lt;/li&gt;
&lt;li&gt;Non-critical tasks
Not best for always-on production.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Savings Plans
&lt;/h3&gt;

&lt;p&gt;You commit to a certain usage/spend level over time.&lt;br&gt;
Good discount and some flexibility.&lt;/p&gt;

&lt;p&gt;Quick student rule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New to AWS -&amp;gt; start On-Demand.&lt;/li&gt;
&lt;li&gt;Predictable long-term app -&amp;gt; compare Reserved/Savings.&lt;/li&gt;
&lt;li&gt;Cost-first experiments -&amp;gt; try Spot.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  3) Instance families (machine categories)
&lt;/h2&gt;

&lt;p&gt;All EC2 machines are not same. AWS groups them by purpose.&lt;/p&gt;
&lt;h3&gt;
  
  
  General purpose
&lt;/h3&gt;

&lt;p&gt;Balanced CPU + RAM.&lt;br&gt;
Example family: T series, M series.&lt;br&gt;
Good for normal web apps and learning.&lt;/p&gt;
&lt;h3&gt;
  
  
  Compute optimized
&lt;/h3&gt;

&lt;p&gt;More CPU power.&lt;br&gt;
Example family: C series.&lt;br&gt;
Good for CPU-heavy tasks like rendering, transforms, game servers.&lt;/p&gt;
&lt;h3&gt;
  
  
  Memory optimized
&lt;/h3&gt;

&lt;p&gt;More RAM.&lt;br&gt;
Example family: R series.&lt;br&gt;
Good for cache/database memory-heavy apps.&lt;/p&gt;
&lt;h3&gt;
  
  
  Storage optimized
&lt;/h3&gt;

&lt;p&gt;Fast/high-throughput disk access.&lt;br&gt;
Example family: I series.&lt;br&gt;
Good for data-intensive workloads.&lt;/p&gt;

&lt;p&gt;A common beginner pick is &lt;code&gt;t3.micro&lt;/code&gt; or &lt;code&gt;t2.micro&lt;/code&gt; style instance (based on region/free-tier rules).&lt;/p&gt;


&lt;h2&gt;
  
  
  4) What is AMI image?
&lt;/h2&gt;

&lt;p&gt;AMI means Amazon Machine Image.&lt;/p&gt;

&lt;p&gt;AMI is like a prebuilt template used to launch an EC2 instance.&lt;br&gt;
It contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OS (Ubuntu, Amazon Linux, Windows, etc.)&lt;/li&gt;
&lt;li&gt;Base config&lt;/li&gt;
&lt;li&gt;Sometimes preinstalled tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two common types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Public AMI: provided by AWS or marketplace/community&lt;/li&gt;
&lt;li&gt;Private AMI: custom image prepared by your org/team&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Easy memory trick: AMI is the "starter pack" for your EC2 machine.&lt;/p&gt;


&lt;h2&gt;
  
  
  5) SSH, public key, private key (important)
&lt;/h2&gt;

&lt;p&gt;When you connect to Linux EC2, usually you use SSH.&lt;/p&gt;

&lt;p&gt;You create/use a key pair:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Public key -&amp;gt; placed on server side&lt;/li&gt;
&lt;li&gt;Private key (&lt;code&gt;.pem&lt;/code&gt;) -&amp;gt; stays only with you&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Never share private key. Ever.&lt;br&gt;
If private key leaks, server access risk is high.&lt;/p&gt;

&lt;p&gt;Basic command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-i&lt;/span&gt; mykey.pem ubuntu@&amp;lt;EC2_PUBLIC_IP&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Common usernames:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu AMI -&amp;gt; &lt;code&gt;ubuntu&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Amazon Linux -&amp;gt; &lt;code&gt;ec2-user&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If permission issue comes for key file, set strict permission:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;400 mykey.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6) Install Nginx and host first static file in /var/www/html
&lt;/h2&gt;

&lt;p&gt;Assume Ubuntu EC2.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install and start Nginx
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; nginx
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start nginx
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Put first static page
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;h1&amp;gt;My first EC2 static page&amp;lt;/h1&amp;gt;"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://&amp;lt;EC2_PUBLIC_IP&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If port 80 is open in Security Group, page will load.&lt;/p&gt;




&lt;h2&gt;
  
  
  7) Flask Hello World host on port 8080 + Security Group
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install Python + Flask
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; python3 python3-pip
pip3 &lt;span class="nb"&gt;install &lt;/span&gt;flask
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create app.py
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;flask&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nd"&gt;@app.route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello World from Flask running on EC2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0.0.0.0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8080&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run it
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Security Group for port 8080
&lt;/h3&gt;

&lt;p&gt;In AWS Console:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 -&amp;gt; Instances -&amp;gt; select your instance&lt;/li&gt;
&lt;li&gt;Security -&amp;gt; click Security Group&lt;/li&gt;
&lt;li&gt;Inbound rules -&amp;gt; Edit inbound rules&lt;/li&gt;
&lt;li&gt;Add rule:

&lt;ul&gt;
&lt;li&gt;Type: Custom TCP&lt;/li&gt;
&lt;li&gt;Port: 8080&lt;/li&gt;
&lt;li&gt;Source: 0.0.0.0/0 (only for demo/testing)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now test in browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://&amp;lt;EC2_PUBLIC_IP&amp;gt;:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see your hello message.&lt;/p&gt;

&lt;p&gt;Production note:&lt;br&gt;
Do not keep wide-open rules forever. Restrict CIDR, use reverse proxy, and enable HTTPS.&lt;/p&gt;




&lt;h2&gt;
  
  
  One-page final summary
&lt;/h2&gt;

&lt;p&gt;EC2 is a cloud server you can rent in minutes.&lt;br&gt;
You choose pricing model based on your budget and stability needs.&lt;br&gt;
Instance families help you pick the right machine for CPU, memory, or storage focus.&lt;br&gt;
AMI is the base image used to launch the instance.&lt;br&gt;
SSH key pair is how you securely log in.&lt;br&gt;
Nginx helps you host static pages from &lt;code&gt;/var/www/html&lt;/code&gt;.&lt;br&gt;
Flask can run on port 8080, and you must allow that port in Security Group.&lt;/p&gt;

&lt;p&gt;If you can do these steps once by yourself, you already have strong EC2 fundamentals.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
