<?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: Tej Tandel</title>
    <description>The latest articles on DEV Community by Tej Tandel (@tejtandel).</description>
    <link>https://dev.to/tejtandel</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3271490%2F6f1b39a6-5ebb-4778-b6bc-916f18d065ab.png</url>
      <title>DEV Community: Tej Tandel</title>
      <link>https://dev.to/tejtandel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tejtandel"/>
    <language>en</language>
    <item>
      <title>Deploy a Secure EC2 Web Server with Terraform, Multi-AZ, and Remote State on AWS</title>
      <dc:creator>Tej Tandel</dc:creator>
      <pubDate>Tue, 17 Jun 2025 21:55:41 +0000</pubDate>
      <link>https://dev.to/tejtandel/deploy-a-secure-ec2-web-server-with-terraform-multi-az-and-remote-state-on-aws-401g</link>
      <guid>https://dev.to/tejtandel/deploy-a-secure-ec2-web-server-with-terraform-multi-az-and-remote-state-on-aws-401g</guid>
      <description>&lt;h1&gt;
  
  
  Deploy a Secure EC2 Web Server with Terraform, VPC, and Remote State on AWS
&lt;/h1&gt;

&lt;p&gt;Are you looking to automate your AWS infrastructure and deploy a web server with best practices? In this guide, you'll learn how to use Terraform to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provision a secure VPC with public/private subnets&lt;/li&gt;
&lt;li&gt;Launch an EC2 instance running Apache with a sample website&lt;/li&gt;
&lt;li&gt;Manage SSH keys and security groups&lt;/li&gt;
&lt;li&gt;Store your Terraform state remotely in S3 for safety and collaboration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's get started!&lt;/p&gt;




&lt;h2&gt;
  
  
  What Does This Project Do?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Creates a VPC&lt;/strong&gt; with public and private subnets across multiple Availability Zones&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sets up an Internet Gateway&lt;/strong&gt; and routing for public subnets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Launches an EC2 instance&lt;/strong&gt; in a public subnet&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configures a Security Group&lt;/strong&gt; for SSH and HTTP access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manages SSH Key Pairs&lt;/strong&gt; for secure access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provisions Apache Web Server&lt;/strong&gt; with a sample website using a shell script&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stores Terraform state remotely&lt;/strong&gt; in an S3 bucket for collaboration and safety&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.terraform.io/downloads.html" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt; installed&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/cli/" rel="noopener noreferrer"&gt;AWS CLI&lt;/a&gt; installed and configured (&lt;code&gt;aws configure&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;An AWS account with permissions to create EC2, VPC, and S3 resources&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  File Overview
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Provider.tf&lt;/strong&gt;: AWS provider configuration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;vpc.tf&lt;/strong&gt;: VPC, subnets, internet gateway, and route tables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instance.tf&lt;/strong&gt;: EC2 instance definition and provisioning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KeyPair.tf&lt;/strong&gt;: SSH key pair resource&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SecurityGroup.tf&lt;/strong&gt;: Security group for SSH/HTTP access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;vars.tf&lt;/strong&gt;: Variables for region, AMI, zones, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;backend.tf&lt;/strong&gt;: Remote state backend (S3)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;web.sh&lt;/strong&gt;: Script to install Apache and deploy a sample website&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;.gitignore&lt;/strong&gt;: Ignore sensitive files and Terraform state&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;terraform-vpc-ssh-key / .pub&lt;/strong&gt;: SSH keys (do not commit private key!)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Clone the repo&lt;/span&gt;
git clone https://github.com/tej6667/terraform-aws-vpc-ec2-webserver.git

&lt;span class="c"&gt;# 2. Initialize Terraform&lt;/span&gt;
terraform init

&lt;span class="c"&gt;# 3. Review the plan&lt;/span&gt;
terraform plan

&lt;span class="c"&gt;# 4. Apply the configuration&lt;/span&gt;
terraform apply
&lt;span class="c"&gt;# Type 'yes' when prompted&lt;/span&gt;

&lt;span class="c"&gt;# 5. Destroy resources when done&lt;/span&gt;
terraform destroy
&lt;span class="c"&gt;# Type 'yes' when prompted&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Customization
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Region &amp;amp; Zones:&lt;/strong&gt; Edit &lt;code&gt;vars.tf&lt;/code&gt; for your preferred AWS region and availability zones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AMI:&lt;/strong&gt; Update the &lt;code&gt;amiID&lt;/code&gt; map in &lt;code&gt;vars.tf&lt;/code&gt; for your region.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Group:&lt;/strong&gt; Change allowed IPs in &lt;code&gt;SecurityGroup.tf&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 Backend:&lt;/strong&gt; Set your S3 bucket name in &lt;code&gt;backend.tf&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSH Key:&lt;/strong&gt; Replace with your own key in &lt;code&gt;KeyPair.tf&lt;/code&gt; and upload your public key.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Notes &amp;amp; Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Never commit AWS credentials or private keys.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Review security group rules before applying.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Remote state in S3 is critical for team collaboration and disaster recovery.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Remember to destroy resources to avoid AWS charges.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Learn More
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.terraform.io/docs" rel="noopener noreferrer"&gt;Terraform Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/" rel="noopener noreferrer"&gt;AWS VPC Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;AWS EC2 Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Questions?
&lt;/h2&gt;

&lt;p&gt;Drop a comment below or check out the &lt;a href="https://github.com/tej6667/terraform-aws-vpc-ec2-webserver.git" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt; for more details!&lt;/p&gt;




</description>
    </item>
    <item>
      <title>"Automate EC2 Web Server Deployment on AWS with Terraform and Remote S3 State: true</title>
      <dc:creator>Tej Tandel</dc:creator>
      <pubDate>Tue, 17 Jun 2025 21:11:30 +0000</pubDate>
      <link>https://dev.to/tejtandel/deploy-a-website-on-aws-ec2-using-terraform-with-s3-backup-3jjd</link>
      <guid>https://dev.to/tejtandel/deploy-a-website-on-aws-ec2-using-terraform-with-s3-backup-3jjd</guid>
      <description>&lt;h1&gt;
  
  
  Automate EC2 Web Server Deployment on AWS with Terraform and Remote S3 State
&lt;/h1&gt;

&lt;p&gt;Managing infrastructure manually is error-prone and inefficient. In this project, I use &lt;strong&gt;Terraform&lt;/strong&gt; to automate the provisioning of an EC2 instance that serves a static website — with terraform state pushed to &lt;strong&gt;S3&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Project Does
&lt;/h2&gt;

&lt;p&gt;This Terraform project sets up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An EC2 instance
&lt;/li&gt;
&lt;li&gt;Security Group allowing HTTP &amp;amp; SSH
&lt;/li&gt;
&lt;li&gt;User-data to install and serve a website
&lt;/li&gt;
&lt;li&gt;S3 bucket for Terraform state storage&lt;/li&gt;
&lt;li&gt;IAM Role &amp;amp; Policy for EC2 access to S3&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step-by-Step Breakdown
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Initialize AWS Provider
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="s2"&gt;"aws"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;region&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Create S3 Bucket
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket"&lt;/span&gt; &lt;span class="s2"&gt;"web_backup"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;bucket&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bucket_name&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Used to store Terraform state.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Security Group
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_security_group"&lt;/span&gt; &lt;span class="s2"&gt;"web_sg"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;        &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"web-sg"&lt;/span&gt;
  &lt;span class="nx"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Allow HTTP and SSH"&lt;/span&gt;

  &lt;span class="nx"&gt;ingress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;from_port&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;
    &lt;span class="nx"&gt;to_port&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;
    &lt;span class="nx"&gt;protocol&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"tcp"&lt;/span&gt;
    &lt;span class="nx"&gt;cidr_blocks&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"your-ip/32"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;ingress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;from_port&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;
    &lt;span class="nx"&gt;to_port&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;
    &lt;span class="nx"&gt;protocol&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"tcp"&lt;/span&gt;
    &lt;span class="nx"&gt;cidr_blocks&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"0.0.0.0/0"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;egress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;from_port&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="nx"&gt;to_port&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="nx"&gt;protocol&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"-1"&lt;/span&gt;
    &lt;span class="nx"&gt;cidr_blocks&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"0.0.0.0/0"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4. Launch EC2 Instance + User Data Script
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_instance"&lt;/span&gt; &lt;span class="s2"&gt;"web_server"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ami&lt;/span&gt;                    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ami&lt;/span&gt;
  &lt;span class="nx"&gt;instance_type&lt;/span&gt;          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;instance_type&lt;/span&gt;
  &lt;span class="nx"&gt;key_name&lt;/span&gt;               &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key_name&lt;/span&gt;
  &lt;span class="nx"&gt;security_groups&lt;/span&gt;        &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;aws_security_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;web_sg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="nx"&gt;user_data&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"web_install.sh"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;iam_instance_profile&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_iam_instance_profile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;s3_profile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;web_install.sh&lt;/code&gt; script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installs Apache&lt;/li&gt;
&lt;li&gt;Deploys static site from &lt;code&gt;website/&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;Uploads a backup to S3 using AWS CLI&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  5. IAM Role to Access S3
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_iam_role_policy"&lt;/span&gt; &lt;span class="s2"&gt;"s3_access"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"s3-access-policy"&lt;/span&gt;
  &lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_iam_role&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ec2_role&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;

  &lt;span class="nx"&gt;policy&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jsonencode&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="nx"&gt;Version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;Statement&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
      &lt;span class="nx"&gt;Action&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"s3:PutObject"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="nx"&gt;Effect&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;Resource&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"arn:aws:s3:::${var.bucket_name}/*"&lt;/span&gt;
    &lt;span class="p"&gt;}]&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives the EC2 instance permission to upload files to your bucket.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Deploy
&lt;/h2&gt;

&lt;p&gt;Run the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform init
terraform plan
terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After deployment, Terraform will output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Public IP of the EC2 instance&lt;/li&gt;
&lt;li&gt;S3 bucket name&lt;/li&gt;
&lt;li&gt;Live website hosted on EC2 (via Apache)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Terraform resource structuring for real-world infrastructure&lt;/li&gt;
&lt;li&gt;Using user-data to bootstrap EC2 after provisioning&lt;/li&gt;
&lt;li&gt;Connecting EC2 and S3 securely with IAM&lt;/li&gt;
&lt;li&gt;Uploading backups automatically to S3&lt;/li&gt;
&lt;li&gt;Practical usage of AWS CLI in automation scripts&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Git Repository
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/tej6667/terraform-ec2-web-s3" rel="noopener noreferrer"&gt;https://github.com/tej6667/terraform-ec2-web-s3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clone it, customize it, and deploy your own cloud-hosted website in minutes.&lt;/p&gt;




&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;I'm Tej Tandel, a Cloud &amp;amp; DevOps enthusiast building hands-on AWS projects and sharing my journey.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/tej-tandel" rel="noopener noreferrer"&gt;LinkedIn: tej-tandel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tej6667/" rel="noopener noreferrer"&gt;GitHub-tej6667&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://projectt14.xyz" rel="noopener noreferrer"&gt;Portfolio-Website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s build the cloud — one project at a time ☁️&lt;/p&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
