<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aditya Shishu on Medium]]></title>
        <description><![CDATA[Stories by Aditya Shishu on Medium]]></description>
        <link>https://medium.com/@aditya.shishu?source=rss-1d9688efa8a8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U84ZKpr5gmiSpdt2Hr3vmw.jpeg</url>
            <title>Stories by Aditya Shishu on Medium</title>
            <link>https://medium.com/@aditya.shishu?source=rss-1d9688efa8a8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 04:54:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aditya.shishu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploy a Static Website on AWS with Terraform]]></title>
            <link>https://medium.com/@aditya.shishu/deploy-a-static-website-on-aws-with-terraform-27335006bded?source=rss-1d9688efa8a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/27335006bded</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[terraform-basic]]></category>
            <dc:creator><![CDATA[Aditya Shishu]]></dc:creator>
            <pubDate>Wed, 23 Jul 2025 16:01:31 GMT</pubDate>
            <atom:updated>2025-07-23T16:01:31.375Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*IpgasGH1Zg2fXxttO7BxSA.png" /></figure><blockquote>🚀 Terraform makes it easy to provision infrastructure as code. In this guide, we’ll learn.</blockquote><ol><li>Create a custom VPC</li><li>Launch an EC2 instance</li><li>Host a static web page on it</li></ol><blockquote>🧱 What We’ll Build</blockquote><p>A simple setup:</p><ol><li>VPC with a public subnet</li><li>Internet Gateway + Route Table</li><li>Security Group allowing HTTP</li><li>EC2 instance with Apache hosting an HTML page</li></ol><blockquote>🗂️ Files Structure</blockquote><pre>project/<br>├── main.tf<br>├── outputs.tf<br>└── userdata.sh</pre><p>🔧 main.tf</p><pre>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;<br>}<br><br>resource &quot;aws_vpc&quot; &quot;main&quot; {<br>  cidr_block = &quot;10.0.0.0/16&quot;<br>}<br><br>resource &quot;aws_subnet&quot; &quot;public&quot; {<br>  vpc_id                  = aws_vpc.main.id<br>  cidr_block              = &quot;10.0.1.0/24&quot;<br>  map_public_ip_on_launch = true<br>}<br><br>resource &quot;aws_internet_gateway&quot; &quot;igw&quot; {<br>  vpc_id = aws_vpc.main.id<br>}<br><br>resource &quot;aws_route_table&quot; &quot;rt&quot; {<br>  vpc_id = aws_vpc.main.id<br><br>  route {<br>    cidr_block = &quot;0.0.0.0/0&quot;<br>    gateway_id = aws_internet_gateway.igw.id<br>  }<br>}<br><br>resource &quot;aws_route_table_association&quot; &quot;assoc&quot; {<br>  subnet_id      = aws_subnet.public.id<br>  route_table_id = aws_route_table.rt.id<br>}<br><br>resource &quot;aws_security_group&quot; &quot;web_sg&quot; {<br>  vpc_id = aws_vpc.main.id<br><br>  ingress {<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}<br><br>resource &quot;aws_instance&quot; &quot;web&quot; {<br>  ami                         = &quot;ami-0c55b159cbfafe1f0&quot; #change AMI<br>  instance_type               = &quot;t2.micro&quot;<br>  subnet_id                   = aws_subnet.public.id<br>  vpc_security_group_ids      = [aws_security_group.web_sg.id]<br>  associate_public_ip_address = true<br>  user_data                   = file(&quot;userdata.sh&quot;)<br><br>  tags = {<br>    Name = &quot;TerraformWeb&quot;<br>  }<br>}</pre><p>📝 userdata.sh (install web server)</p><pre>#!/bin/bash<br>yum update -y<br>yum install -y httpd<br>systemctl start httpd<br>systemctl enable httpd<br>echo &quot;&lt;h1&gt;Hello from Terraform EC2!&lt;/h1&gt;&quot; &gt; /var/www/html/index.html</pre><p>📤 outputs.tf</p><pre>output &quot;public_ip&quot; {<br>  value = aws_instance.web.public_ip<br>}</pre><blockquote>🖼️ Architecture</blockquote><p>Internet → IGW → Route Table → Public Subnet → EC2 + HTTP → Web Page</p><p>✅ Deploy</p><pre>terraform init<br>terraform apply</pre><p>🔄 Destroy</p><pre>terraform destroy</pre><p>🔚 Done!</p><p>In a few lines of code, you’ve deployed a working web server inside a custom VPC. Clean, repeatable, and no manual clicks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27335006bded" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>