<?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: David Nanjila</title>
    <description>The latest articles on DEV Community by David Nanjila (@stoicdavi).</description>
    <link>https://dev.to/stoicdavi</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%2F1870185%2F8b813ac4-c10c-441e-9f0b-eb586e36ec2d.jpeg</url>
      <title>DEV Community: David Nanjila</title>
      <link>https://dev.to/stoicdavi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stoicdavi"/>
    <language>en</language>
    <item>
      <title>Step-by-Step Guide to Setting Up Terraform, AWS CLI, and Your AWS Environment</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Tue, 24 Mar 2026 14:17:36 +0000</pubDate>
      <link>https://dev.to/stoicdavi/step-by-step-guide-to-setting-up-terraform-aws-cli-and-your-aws-environment-4m19</link>
      <guid>https://dev.to/stoicdavi/step-by-step-guide-to-setting-up-terraform-aws-cli-and-your-aws-environment-4m19</guid>
      <description>&lt;p&gt;If you're just getting started with infrastructure as code, the first few hours can feel like you're assembling furniture without the instruction manual. You know the end goal — a working Terraform setup connected to AWS — but the path there involves a surprising number of small decisions that can trip you up if you're not careful.&lt;/p&gt;

&lt;p&gt;This post walks through exactly what I did to get my environment up and running: AWS account setup, IAM configuration, AWS CLI installation, and finally connecting Terraform to AWS. Whether you're brand new to this or you've done bits of it before but never cleanly all at once, I'll share what I learned along the way — including the stuff I wish someone had told me upfront.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We're Setting Up
&lt;/h2&gt;

&lt;p&gt;Before we dive in, here's the full picture of what we're building across these three labs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lab 1:&lt;/strong&gt; Set up your AWS account with proper IAM and billing configuration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lab 2:&lt;/strong&gt; Install and configure the AWS CLI &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lab 3:&lt;/strong&gt; &lt;a href="https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli" rel="noopener noreferrer"&gt;Install Terraform&lt;/a&gt; and connect it to AWS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's go step by step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lab 1: AWS Account Setup — Don't Skip the IAM and Billing Parts
&lt;/h2&gt;

&lt;p&gt;If you already have an AWS account, you might be tempted to skip this section entirely. I'd actually encourage you not to — or at least skim it — because the IAM and billing setup tips here are genuinely worth your time, even if you've had an account for years.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Your AWS Account
&lt;/h3&gt;

&lt;p&gt;Head to &lt;a href="https://aws.amazon.com" rel="noopener noreferrer"&gt;aws.amazon.com&lt;/a&gt; and sign up. You'll need a credit card, but AWS has a generous free tier that covers most of what we'll be doing here. The signup process is straightforward, so I won't belabor it.&lt;/p&gt;

&lt;p&gt;What &lt;em&gt;does&lt;/em&gt; matter is what you do immediately after you log in for the first time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lock Down Your Root Account — Seriously
&lt;/h3&gt;

&lt;p&gt;When you first create an AWS account, you log in as the &lt;strong&gt;root user&lt;/strong&gt;. This account has unrestricted access to everything in your AWS environment — billing, account settings, all services, all regions. No guardrails. No limits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You should never use the root account for day-to-day work.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first thing to do is secure it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enable &lt;strong&gt;Multi-Factor Authentication (MFA)&lt;/strong&gt; on the root account&lt;/li&gt;
&lt;/ol&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.amazonaws.com%2Fuploads%2Farticles%2Fx3ep0ci2dtwulmqwa5aj.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.amazonaws.com%2Fuploads%2Farticles%2Fx3ep0ci2dtwulmqwa5aj.png" alt="howing enable MFA in I AM page" width="800" height="148"&gt;&lt;/a&gt;&lt;br&gt;
click enable MFA and you can use authentication app to add your MFA authentication code&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.amazonaws.com%2Fuploads%2Farticles%2Fqx6ifowm4zrco9zf6lq9.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.amazonaws.com%2Fuploads%2Farticles%2Fqx6ifowm4zrco9zf6lq9.png" alt="Showinf MFA enabled" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a strong password and store it somewhere safe (a password manager)&lt;/li&gt;
&lt;li&gt;Then step away from the root account and don't look back, Proceed to set up an IAM user.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started.html" rel="noopener noreferrer"&gt;Setting Up IAM&lt;/a&gt; — The Right Way
&lt;/h3&gt;

&lt;p&gt;IAM (Identity and Access Management) is how AWS controls &lt;em&gt;who&lt;/em&gt; can do &lt;em&gt;what&lt;/em&gt; in your account. Instead of using root credentials, you create IAM users with specific permissions.&lt;/p&gt;

&lt;p&gt;Here's the setup I used:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to &lt;strong&gt;IAM&lt;/strong&gt; in the AWS Console( search and click on I AM)&lt;/li&gt;
&lt;/ol&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.amazonaws.com%2Fuploads%2Farticles%2Fvoq5qa63m53ym3o0lo7f.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.amazonaws.com%2Fuploads%2Farticles%2Fvoq5qa63m53ym3o0lo7f.png" alt="Showing aws management console" width="800" height="253"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new IAM user (I named mine something like &lt;code&gt;nanjila-terraform&lt;/code&gt; to keep it obvious)
Click on users on the left menu and then click create user on top right.&lt;/li&gt;
&lt;/ol&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.amazonaws.com%2Fuploads%2Farticles%2Fjf9urqu56ycv4a1cefyf.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.amazonaws.com%2Fuploads%2Farticles%2Fjf9urqu56ycv4a1cefyf.png" alt="IAM user creation page/window" width="800" height="253"&gt;&lt;/a&gt;&lt;br&gt;
Give your user an appropriate name and then check the &lt;code&gt;provide user access to the aws management console&lt;/code&gt; box. Why? &lt;strong&gt;This is to allow the user to login to the console and also be able to connect to your console programmaticaly.&lt;br&gt;
Leave everything as default and then click next to set the user permission&lt;/strong&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fd54ciq7gduavig6zlw5f.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.amazonaws.com%2Fuploads%2Farticles%2Fd54ciq7gduavig6zlw5f.png" alt="IAM user name" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Attach the &lt;strong&gt;AdministratorAccess&lt;/strong&gt; policy — this gives full access but is still safer than root because it's auditable and can be revoked
Click on te attach policy directly and search for the, in the search bar, type admin and click the `administrator access and click next to review and create the user.
&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.amazonaws.com%2Fuploads%2Farticles%2Fubtxh8g1cdjym2fbj1jo.png" alt="Review and create user" width="800" height="370"&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.amazonaws.com%2Fuploads%2Farticles%2Ftogfadknrc3019xv56t1.png" alt="view user" width="800" height="286"&gt;
Once the user is created, click on the download .csv file to get the IAM user name and login password ** Don’t skip this ** save it, open it to get the url, username and password to login.
Then click on view user on top left&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on  &lt;strong&gt;Security credentials&lt;/strong&gt;,click create access key on your right or scroll down and then click create an &lt;strong&gt;Access Key&lt;/strong&gt; you'll need this for the CLI and Terraform&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fm7xv9a0ihfk8i1lrgy88.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.amazonaws.com%2Fuploads%2Farticles%2Fm7xv9a0ihfk8i1lrgy88.png" alt="Giving user programmatic access" width="800" height="364"&gt;&lt;/a&gt;&lt;br&gt;
For use case, select command line access and then confirm the check box as shown below.&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F5aeoc601s75h693n6nsj.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.amazonaws.com%2Fuploads%2Farticles%2F5aeoc601s75h693n6nsj.png" alt="Create user access keys" width="800" height="387"&gt;&lt;/a&gt;&lt;br&gt;
Leave everything as default and then click create access key&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download or copy the Access Key ID and Secret Access Key somewhere safe. &lt;strong&gt;You only get one chance to see the secret key.&lt;/strong&gt;&lt;br&gt;
Remember to read the access key best practices&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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.amazonaws.com%2Fuploads%2Farticles%2F4s430hdaep79c28ly2qr.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.amazonaws.com%2Fuploads%2Farticles%2F4s430hdaep79c28ly2qr.png" alt="Download access keys" width="800" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;What I learned when setting up the permissions :&lt;/strong&gt; For a learning environment, &lt;code&gt;AdministratorAccess&lt;/code&gt; is fine. In a real production setup, you'd want to follow the principle of least privilege, only granting the specific permissions Terraform actually needs. Something to keep in mind as you grow.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Set Up a Billing Alert/ Zero spend budget
&lt;/h3&gt;

&lt;p&gt;Before you do anything else, set up a billing alert. AWS costs can sneak up on you, especially when you're experimenting.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Billing and Cost Management&lt;/strong&gt; in the console&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Budgets&lt;/strong&gt; and create a budget&lt;/li&gt;
&lt;li&gt;Set a threshold that makes sense for you — even $0.01 or $1 is enough to get an email before things spiral&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This took five minutes and has saved me from more than one surprise at the end of the month.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lab 2: Installing and Configuring the AWS CLI
&lt;/h2&gt;

&lt;p&gt;With your IAM user and access keys ready, the next step is getting the AWS CLI installed so you can interact with AWS from your terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing the &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html" rel="noopener noreferrer"&gt;AWS CLI&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The installation process varies slightly by OS:AWS provides a very good documentation for this I followed the documentation and it felt so easy to install, you can check the documentation and follow through depending with your Operating system.&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.amazonaws.com%2Fuploads%2Farticles%2Fxhxzgtrfcddi0n4zio56.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.amazonaws.com%2Fuploads%2Farticles%2Fxhxzgtrfcddi0n4zio56.png" alt="Confirm aws CLI installation" width="799" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring the CLI
&lt;/h3&gt;

&lt;p&gt;Now connect the CLI to your IAM user:&lt;br&gt;
Run the following command&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
aws configure&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
You'll be prompted for four things:&lt;br&gt;
Open the .csv access key file you downloaded and then copy and paste in the details required.&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fa6afgphxh3k95muj120n.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.amazonaws.com%2Fuploads%2Farticles%2Fa6afgphxh3k95muj120n.png" alt="Configure user access key and secrete access key" width="732" height="159"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
AWS Access Key ID [None]: YOUR_ACCESS_KEY_ID&lt;br&gt;
AWS Secret Access Key [None]: YOUR_SECRET_ACCESS_KEY&lt;br&gt;
Default region name [None]: us-east-1&lt;br&gt;
Default output format [None]: json&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
Use the access key you created for your IAM user — &lt;strong&gt;not root credentials&lt;/strong&gt;.&lt;br&gt;
This stores your credentials in &lt;code&gt;~/.aws/credentials&lt;/code&gt; and your config in &lt;code&gt;~/.aws/config&lt;/code&gt;. You can open those files and inspect them directly if you want to see what's happening under the hood.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verify It's Working
&lt;/h3&gt;

&lt;p&gt;Test your connection with a simple command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
aws sts get-caller-identity&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F6mo8h1sh0cy5yto6m4re.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.amazonaws.com%2Fuploads%2Farticles%2F6mo8h1sh0cy5yto6m4re.png" alt="User Credentials" width="732" height="159"&gt;&lt;/a&gt;&lt;br&gt;
If everything is configured correctly, you'll get back a JSON response showing your Account ID, User ID, and ARN. If you see your IAM user's ARN in there as shown above, you're good to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lab 3: &lt;a href="https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli" rel="noopener noreferrer"&gt;Installing Terraform&lt;/a&gt; and Connecting It to AWS
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Installing Terraform
&lt;/h3&gt;

&lt;p&gt;You can follow this official terraform documentation for easy installation&lt;/p&gt;

&lt;h3&gt;
  
  
  VSCode Extensions I'm Using
&lt;/h3&gt;

&lt;p&gt;If you're writing Terraform in VSCode (and you should be — the experience is genuinely good), here are the extensions I installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HashiCorp Terraform&lt;/strong&gt; for syntax highlighting, IntelliSense, and formatting for &lt;code&gt;.tf&lt;/code&gt; files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS Toolkit&lt;/strong&gt; — connect to AWS services directly from VSCode, browse resources, and manage credentials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitLens — Git supercharged&lt;/strong&gt; — enhances Git functionality; it is considered essential ("non-negotiable") for managing your Terraform code, ensuring that all changes are properly tracked and controlled using version control.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Connecting Terraform to AWS
&lt;/h3&gt;

&lt;p&gt;This is where it all comes together — and it's also where we learn something important about how Terraform authenticates.&lt;/p&gt;

&lt;h4&gt;
  
  
  How Terraform Authenticates with AWS
&lt;/h4&gt;

&lt;p&gt;Terraform uses the &lt;strong&gt;AWS provider&lt;/strong&gt; to interact with AWS. When you run &lt;code&gt;terraform apply&lt;/code&gt;, it needs credentials to make API calls on your behalf. There are a few ways it can get those credentials, and understanding the order matters:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Environment variables&lt;/strong&gt; (&lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt;, &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared credentials file&lt;/strong&gt; (&lt;code&gt;~/.aws/credentials&lt;/code&gt;) — what &lt;code&gt;aws configure&lt;/code&gt; set up&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM roles&lt;/strong&gt; (when running on EC2 or in CI/CD pipelines)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardcoded in the provider block&lt;/strong&gt; — please don't do this this is not recommended practice as I was learning through&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because I already ran &lt;code&gt;aws configure&lt;/code&gt;, Terraform automatically picks up my credentials from &lt;code&gt;~/.aws/credentials&lt;/code&gt;. No extra configuration needed in the Terraform code itself. This is the cleanest approach for local development.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key points: What Would Happen If You Used Root Credentials?
&lt;/h4&gt;

&lt;p&gt;Technically, it would work. Terraform doesn't care whether the credentials belong to root or an IAM user, it just needs valid credentials with the right permissions.&lt;/p&gt;

&lt;p&gt;Why it's a bad idea: &lt;strong&gt;Root credentials are the keys to the kingdom.&lt;/strong&gt; If those credentials were ever leaked — committed to a public GitHub repo, exposed in logs, intercepted, an attacker would have unrestricted access to your entire AWS account. They could spin up resources, exfiltrate data, rack up a massive bill, or delete everything. There's no way to scope or limit root access. You can't say "these root credentials can only touch EC2" root is Root means everything.&lt;/p&gt;

&lt;p&gt;With an IAM user, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scope permissions to only what's needed&lt;/li&gt;
&lt;li&gt;Rotate credentials without affecting other users or services&lt;/li&gt;
&lt;li&gt;Disable or delete the user if credentials are compromised&lt;/li&gt;
&lt;li&gt;Audit exactly what that user has done via CloudTrail&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's also a practical reason: AWS explicitly recommends against using root credentials for programmatic access. It's considered a security misconfiguration, and tools like AWS Security Hub will flag it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The rule is simple: root credentials stay in the safe. IAM credentials do the work.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Finally : Common Mistakes to Avoid
&lt;/h2&gt;

&lt;p&gt;A few things that can trip you up and cost you time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Using root credentials in &lt;code&gt;aws configure&lt;/code&gt;&lt;/strong&gt; — Use your IAM user's access keys instead&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Committing credentials to Git&lt;/strong&gt; — Add &lt;code&gt;.terraform/&lt;/code&gt; and any &lt;code&gt;.tfvars&lt;/code&gt; files containing secrets to your &lt;code&gt;.gitignore&lt;/code&gt; from day one&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skipping the billing alert&lt;/strong&gt; — Takes five minutes, potentially saves you hundreds of dollars&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not pinning your Terraform provider version&lt;/strong&gt; — Using &lt;code&gt;~&amp;gt; 5.0&lt;/code&gt; instead of just &lt;code&gt;aws&lt;/code&gt; prevents unexpected breaking changes when the provider updates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forgetting to run &lt;code&gt;terraform init&lt;/code&gt; after adding a provider&lt;/strong&gt; — It won't work without it; init downloads the provider plugins&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>awschallenge</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Getting started with terraform on AWS, a practical guide</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Tue, 17 Mar 2026 20:13:50 +0000</pubDate>
      <link>https://dev.to/stoicdavi/getting-started-with-terraform-on-aws-a-practical-guide-2nk5</link>
      <guid>https://dev.to/stoicdavi/getting-started-with-terraform-on-aws-a-practical-guide-2nk5</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/stoicdavi" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1870185%2F8b813ac4-c10c-441e-9f0b-eb586e36ec2d.jpeg" alt="stoicdavi"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/stoicdavi/getting-started-with-terraform-on-aws-infrastructure-as-code-the-right-way-5g42" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Getting Started with Terraform on AWS: Infrastructure as Code the Right Way&lt;/h2&gt;
      &lt;h3&gt;David Nanjila ・ Mar 17&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#30dayterraformchallenge&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#terraform&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#hashicorp&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#awsusergroupkenya&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>30dayterraformchallenge</category>
      <category>terraform</category>
      <category>hashicorp</category>
      <category>awsusergroupkenya</category>
    </item>
    <item>
      <title>Getting Started with Terraform on AWS: Infrastructure as Code the Right Way</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Tue, 17 Mar 2026 20:02:20 +0000</pubDate>
      <link>https://dev.to/stoicdavi/getting-started-with-terraform-on-aws-infrastructure-as-code-the-right-way-5g42</link>
      <guid>https://dev.to/stoicdavi/getting-started-with-terraform-on-aws-infrastructure-as-code-the-right-way-5g42</guid>
      <description>&lt;p&gt;&lt;em&gt;A practical guide to setting up Terraform and AWS CLI on Ubuntu — from zero&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why you should Start Caring About Infrastructure as Code
&lt;/h2&gt;

&lt;p&gt;Let me paint a picture that might sound familiar.&lt;/p&gt;

&lt;p&gt;You're deploying an application. You spin up an EC2 instance manually through the AWS console, configure a security group, set up an S3 bucket, tweak some IAM permissions — and everything works. &lt;/p&gt;

&lt;p&gt;Two weeks later, you need to do the exact same thing for a staging environment. You click through the console again, trying to remember every setting you configured the first time. Did you allow port 443? Which AMI did you use? Why is staging behaving differently from production?&lt;/p&gt;

&lt;p&gt;Sound familiar? That's exactly the problem &lt;strong&gt;Infrastructure as Code (IaC)&lt;/strong&gt; solves — and it's why I decided to get serious about Terraform.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Infrastructure as Code, Really?
&lt;/h2&gt;

&lt;p&gt;It is exactly what it sounds like — instead of manually clicking through consoles or running one-off commands to provision your infrastructure, you &lt;strong&gt;write code that describes what your infrastructure should look like&lt;/strong&gt;, and it handles the rest(infrastructure provisioning and state management).&lt;/p&gt;

&lt;p&gt;But it's more than just automation. IaC fundamentally changes &lt;em&gt;how&lt;/em&gt; you think about infrastructure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt; — your dev, staging, and production environments are built from the same code. No more "but it works on my environment" problems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed and scale&lt;/strong&gt; — need 10 servers instead of 1? Change a number in your config and apply. Done&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version control&lt;/strong&gt; — your infrastructure lives in Git just like your application code. You can see who changed what, when, and why&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeatability&lt;/strong&gt; — destroy everything and rebuild it identically in minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud flexibility&lt;/strong&gt; — IaC works both on-premises and across public cloud providers, giving you a consistent workflow regardless of where your infrastructure lives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-cloud&lt;/strong&gt; - IaC tool i.e terraform, can be used by all the cloud providers for infrastructure provisioning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is simple: &lt;strong&gt;remove manual, error-prone tasks from your infrastructure workflow and replace them with something consistent, professional, and repeatable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The there are many IaC tools but, in the next 30 days, we're focusing on &lt;strong&gt;&lt;a href="https://developer.hashicorp.com/terraform" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt; on AWS&lt;/strong&gt; — the  starting point because the skills transfer across clouds.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we are building on Day One (and what you will accomplish today)
&lt;/h2&gt;

&lt;p&gt;✅ Terraform installed on Ubuntu&lt;br&gt;&lt;br&gt;
✅ Shell autocompletion enabled for Terraform&lt;br&gt;&lt;br&gt;
✅ AWS CLI installed and configured&lt;br&gt;&lt;br&gt;
✅ A working connection between Terraform and your AWS account  &lt;/p&gt;

&lt;p&gt;Let's get into it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we start, make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Ubuntu machine (I'm running &lt;strong&gt;Ubuntu 22.04 LTS&lt;/strong&gt; — steps are similar for 20.04)&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;AWS account&lt;/strong&gt; (free tier works perfectly for learning)&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;IAM user&lt;/strong&gt; with programmatic access (we'll touch on this)&lt;/li&gt;
&lt;li&gt;Basic comfort with the terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Beginner tip:&lt;/strong&gt; If you're brand new to the terminal, don't worry. Every command I run, I'll explain what it's doing and why.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Step 1: Installing Terraform on Ubuntu
&lt;/h2&gt;

&lt;p&gt;HashiCorp provides an official package repository for Ubuntu, which is the cleanest way to install Terraform. This means you'll also get updates automatically through &lt;code&gt;apt&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  1.1  Install Required Dependencies
&lt;/h3&gt;

&lt;p&gt;First, let's make sure we have the tools needed to add a new package repository:&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;sudo &lt;/span&gt;apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; gnupg software-properties-common
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What this does:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;apt-get update&lt;/code&gt; — refreshes your local package list&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gnupg&lt;/code&gt; — allows us to verify the authenticity of the HashiCorp package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;software-properties-common&lt;/code&gt; — gives us tools to manage additional repositories&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  1.2 Add the HashiCorp GPG Key
&lt;/h3&gt;

&lt;p&gt;We need to verify that the packages we're downloading are genuinely from HashiCorp:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget &lt;span class="nt"&gt;-O-&lt;/span&gt; https://apt.releases.hashicorp.com/gpg | &lt;span class="se"&gt;\&lt;/span&gt;
gpg &lt;span class="nt"&gt;--dearmor&lt;/span&gt; | &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nb"&gt;sudo tee&lt;/span&gt; /usr/share/keyrings/hashicorp-archive-keyring.gpg &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1.3 Add the Official HashiCorp Repository
&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;"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
https://apt.releases.hashicorp.com &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;lsb_release &lt;span class="nt"&gt;-cs&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; main"&lt;/span&gt; | &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/apt/sources.list.d/hashicorp.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What's happening here?&lt;/strong&gt; &lt;code&gt;$(lsb_release -cs)&lt;/code&gt; automatically detects your Ubuntu version (e.g., &lt;code&gt;jammy&lt;/code&gt; for 22.04, &lt;code&gt;focal&lt;/code&gt; for 20.04) so the right packages are pulled. Neat.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  1.4 Install Terraform
&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-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;terraform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1.5 Verify the Installation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform &lt;span class="nt"&gt;-version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see output similar to:&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.amazonaws.com%2Fuploads%2Farticles%2Fw0kbwum0behnsx6qjbo4.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.amazonaws.com%2Fuploads%2Farticles%2Fw0kbwum0behnsx6qjbo4.png" alt="Verifying terraform installation" width="498" height="107"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you see that version output — Terraform is installed. &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Enable Terraform Autocompletion
&lt;/h2&gt;

&lt;p&gt;This is a small step that makes a &lt;em&gt;big&lt;/em&gt; difference in your day-to-day workflow. Autocompletion lets you press &lt;code&gt;Tab&lt;/code&gt; to complete Terraform commands, subcommands, and flags — massive time saver.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.1 Install the Autocomplete Package
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform &lt;span class="nt"&gt;-install-autocomplete&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It does not return any output&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 Reload Your Shell
&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;exec&lt;/span&gt; &lt;span class="nv"&gt;$SHELL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or simply close and reopen your terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test It
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;terraform&lt;/code&gt; in your terminal, then press &lt;code&gt;Tab&lt;/code&gt; twice. You should see a list of available commands pop up:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fgtyfhjz0hang7vour3q4.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.amazonaws.com%2Fuploads%2Farticles%2Fgtyfhjz0hang7vour3q4.png" alt="Showing list of available terraform commands" width="697" height="163"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As Terraform projects grow, you'll be working with longer resource names and module paths where tab completion saves you from a lot of typos.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html" rel="noopener noreferrer"&gt;Installing the AWS CLI&lt;/a&gt; on Ubuntu
&lt;/h2&gt;

&lt;p&gt;Terraform needs to communicate with AWS on your behalf. The AWS CLI handles authentication and provides the credentials Terraform will use. Let's get it installed.&lt;/p&gt;
&lt;h3&gt;
  
  
  3.1  Download the AWS CLI v2 Installer
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s2"&gt;"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s2"&gt;"awscliv2.zip"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  3.2 Unzip the Installer
&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-get &lt;span class="nb"&gt;install &lt;/span&gt;unzip &lt;span class="nt"&gt;-y&lt;/span&gt;
unzip awscliv2.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  3.3  Run the Installer
&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; ./aws/install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  3.4  Verify the Installation
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Expected output:&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.amazonaws.com%2Fuploads%2Farticles%2Fyk10wo19f5n5dkezlt2v.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.amazonaws.com%2Fuploads%2Farticles%2Fyk10wo19f5n5dkezlt2v.png" alt="Aws version verification" width="780" height="105"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 4: &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds-programmatic-access.html" rel="noopener noreferrer"&gt;Configuring the AWS CLI&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Now we need to connect the AWS CLI to your actual AWS account. To do this, you'll need an &lt;strong&gt;IAM user with programmatic access&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  4.1  Create an IAM User (Quick Overview)
&lt;/h3&gt;

&lt;p&gt;If you haven't already:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log into your &lt;strong&gt;AWS Console&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;IAM → Users → Create User&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Give the user a name (e.g., &lt;code&gt;terraform-admin&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Permissions&lt;/strong&gt;, attach the &lt;code&gt;AdministratorAccess&lt;/code&gt; policy (for learning — tighten this for production)&lt;/li&gt;
&lt;li&gt;After creating the user, go to &lt;strong&gt;Security Credentials → Create Access Key&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;CLI&lt;/strong&gt; as the use case&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Download or copy your Access Key ID and Secret Access Key&lt;/strong&gt; — you won't see the secret again&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Security note:&lt;/strong&gt; Never commit your AWS credentials to Git. Never. I mean it. We'll talk about safer approaches as you progress, but for now — keep those keys safe.&lt;/p&gt;
&lt;h3&gt;
  
  
  4.2  Configure the AWS CLI
&lt;/h3&gt;

&lt;p&gt;Run the configuration wizard:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll be prompted for four things:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AWS Access Key ID [None]: YOUR_ACCESS_KEY_ID
AWS Secret Access Key [None]: YOUR_SECRET_ACCESS_KEY
Default region name [None]: us-east-1
Default output format [None]: json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;A few notes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Replace &lt;code&gt;us-east-1&lt;/code&gt; with your preferred AWS region (e.g., &lt;code&gt;eu-west-1&lt;/code&gt; for Europe, &lt;code&gt;ap-southeast-1&lt;/code&gt; for Asia Pacific)&lt;/li&gt;
&lt;li&gt;Output format &lt;code&gt;json&lt;/code&gt; is generally the most useful for scripting and readability or leave it blank.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fexq6ajizn6tt0frvsfly.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.amazonaws.com%2Fuploads%2Farticles%2Fexq6ajizn6tt0frvsfly.png" alt="Example of aws configurations" width="780" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4.3 — Verify Your AWS Connection
&lt;/h3&gt;

&lt;p&gt;Let's confirm the CLI can actually talk to AWS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws sts get-caller-identity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything is configured correctly, you'll see something like:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fqi5xl2s9z4z0hz7k9jdc.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.amazonaws.com%2Fuploads%2Farticles%2Fqi5xl2s9z4z0hz7k9jdc.png" alt="Aws connection configuration connection success." width="800" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That response means your CLI is authenticated and talking to AWS.&lt;br&gt;
That is all for today, let meet tomorrow even as we dive deeper.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Mistakes to Avoid Early On
&lt;/h2&gt;

&lt;p&gt;I'd rather you learn from these now than discover them at 2am:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Storing credentials in your Terraform files&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Never hardcode your &lt;code&gt;access_key&lt;/code&gt; and &lt;code&gt;secret_key&lt;/code&gt; directly in your &lt;code&gt;.tf&lt;/code&gt; files. Terraform automatically picks up credentials from &lt;code&gt;aws configure&lt;/code&gt; — let it do that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Not running &lt;code&gt;terraform init&lt;/code&gt; after adding providers&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Every time you add a new provider or module, run &lt;code&gt;terraform init&lt;/code&gt; again. It's easy to forget and the error messages can be confusing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Skipping &lt;code&gt;terraform plan&lt;/code&gt; before &lt;code&gt;terraform apply&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Always run &lt;code&gt;terraform plan&lt;/code&gt; first. It shows you exactly what Terraform is about to do — think of it as a dry run. This habit will save you from some very expensive surprises.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Using &lt;code&gt;AdministratorAccess&lt;/code&gt; in production&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Fine for learning, not fine for real workloads. As you get more comfortable, practice least-privilege IAM permissions.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Now that your environment is set up, you're ready to start writing real Terraform code. In upcoming posts, I'll be covering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing your first Terraform resource (spinning up an EC2 instance)&lt;/li&gt;
&lt;li&gt;Understanding Terraform state and why it matters&lt;/li&gt;
&lt;li&gt;Variables, outputs, and keeping your code reusable&lt;/li&gt;
&lt;li&gt;Remote state with S3 and DynamoDB for team environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The foundation is in place. Everything from here is building on top of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Setting up your Terraform and AWS environment on Ubuntu is genuinely straightforward once you know the steps — and now you do. What used to take me a while to piece together from different docs is now a repeatable process I can set up in under 15 minutes.&lt;/p&gt;

&lt;p&gt;That's the whole point of Infrastructure as Code. Once you do something right, you codify it, and you never have to figure it out from scratch again.&lt;/p&gt;

&lt;p&gt;If you ran into any issues or have questions about any of the steps, drop them in the comments below. And if this was helpful, share it with someone else who's just getting started on their cloud and DevOps journey — we all start somewhere.&lt;/p&gt;

&lt;p&gt;Happy building. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Found this useful? Follow along for more hands-on DevOps and cloud content.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>30dayterraformchallenge</category>
      <category>terraform</category>
      <category>hashicorp</category>
      <category>awsusergroupkenya</category>
    </item>
    <item>
      <title>Your Server Just Caught Fire – But Your App’s Still Running: The EC2 Superpower</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Mon, 11 Aug 2025 18:38:20 +0000</pubDate>
      <link>https://dev.to/stoicdavi/your-server-just-caught-fire-but-your-apps-still-running-the-ec2-superpower-88n</link>
      <guid>https://dev.to/stoicdavi/your-server-just-caught-fire-but-your-apps-still-running-the-ec2-superpower-88n</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2Fhxj6zla2g6wlxn6y1p4j.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.amazonaws.com%2Fuploads%2Farticles%2Fhxj6zla2g6wlxn6y1p4j.png" alt=" " width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Imagine this: You run a small e-commerce site. It’s Black Friday, traffic is flooding in… and your main server suddenly crashes. Normally, this means lost sales, angry customers, and a long night for your IT team. But with &lt;a href="https://aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;Amazon EC2 (Elastic Compute Cloud)&lt;/a&gt;, your app keeps running because your servers aren’t tied to a single machine — they live in the AWS cloud, spread across multiple data centers.&lt;br&gt;
That’s the power of EC2, flexible, on-demand virtual servers you can launch or resize in minutes, backed by the scale and reliability of &lt;a href="https://aws.amazon.com/" rel="noopener noreferrer"&gt;Amazon Web Services&lt;/a&gt;. AWS offers hundreds of services, but EC2 is its compute backbone — whether you’re hosting websites, processing data, or running machine learning models.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Real-World Scenario: What Happens When Your Laptop Dies Mid-Presentation?&lt;/strong&gt;&lt;br&gt;
Imagine you’re in the middle of a critical client presentation. Your laptop fan starts screaming, the screen goes black, and… nothing. No backups on a USB, no files on the local drive.&lt;/p&gt;

&lt;p&gt;Normally, that’s game over.&lt;/p&gt;

&lt;p&gt;But if your systems run on &lt;a href="https://aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;Amazon EC2&lt;/a&gt;, it’s just a mild inconvenience — you log in from another device and your work is right there, unaffected.&lt;br&gt;
That’s the beauty of cloud computing — your business keeps moving even if your hardware fails.&lt;/p&gt;

&lt;p&gt;Whether you're a student testing your first app, a mid-level engineer running internal tools, or a seasoned architect deploying enterprise workloads, EC2 removes the single point of failure: your personal device.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You might be asking how I can learn AWS?&lt;/strong&gt;&lt;br&gt;
The official AWS learning platform is &lt;a href="https://skillbuilder.aws/" rel="noopener noreferrer"&gt;AWS Skill Builder&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offers free and subscription learning paths for all skill levels.&lt;/li&gt;
&lt;li&gt;Includes &lt;a href="https://aws.amazon.com/training/digital/aws-cloud-quest/" rel="noopener noreferrer"&gt;AWS Cloud Quest&lt;/a&gt; — a gamified learning experience where you complete real-world scenarios in a virtual city.&lt;/li&gt;
&lt;li&gt;Lets you prepare for &lt;a href="https://aws.amazon.com/certification/" rel="noopener noreferrer"&gt;AWS Certifications&lt;/a&gt; with practice exams and interactive labs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to learn EC2 in a way that sticks, Cloud Quest is a great start because it forces you to actually deploy, connect, and manage instances, not just read about them.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Most Common EC2 Use Cases (From Cloud Quest’s First Exercise)&lt;/strong&gt;&lt;br&gt;
In the very first &lt;a href="https://aws.amazon.com/training/digital/aws-cloud-quest/" rel="noopener noreferrer"&gt;AWS Cloud Quest EC2 mission&lt;/a&gt;, you’re tasked with launching two EC2 instances in different Availability Zones for high availability. This simple exercise teaches key scenarios where EC2 shines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High Availability Websites &amp;amp; Apps&lt;/strong&gt; — keep running even if one data center fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Demand Scaling&lt;/strong&gt; — add or remove instances as traffic changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global Reach&lt;/strong&gt; — deploy in multiple AWS Regions to serve users faster.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick Recovery&lt;/strong&gt; — replace a failed server in minutes without touching hardware.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Best Practices to Follow (From Official AWS Resources)&lt;/strong&gt;&lt;br&gt;
AWS recommends these &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-best-practices.html" rel="noopener noreferrer"&gt;EC2 best practices&lt;/a&gt; (all reinforced in Cloud Quest):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deploy Across Multiple AZs&lt;/strong&gt; – Improves fault tolerance and resilience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Auto Scaling&lt;/strong&gt; – &lt;a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html" rel="noopener noreferrer"&gt;Automatically add or remove instances&lt;/a&gt; to match demand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure with IAM Roles &amp;amp; Security Groups&lt;/strong&gt; – Grant least-privilege access using &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html" rel="noopener noreferrer"&gt;IAM roles&lt;/a&gt; and &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html" rel="noopener noreferrer"&gt;security groups&lt;/a&gt; to tightly control network traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Right-Size Your Instances&lt;/strong&gt; – Choose &lt;a href="https://aws.amazon.com/ec2/instance-types/" rel="noopener noreferrer"&gt;instance types&lt;/a&gt; that match your workload; adjust as needs change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate Backups&lt;/strong&gt; – Use &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html" rel="noopener noreferrer"&gt;Amazon Machine Images (AMIs)&lt;/a&gt; and &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html" rel="noopener noreferrer"&gt;snapshots&lt;/a&gt; for quick recovery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor &amp;amp; Optimize&lt;/strong&gt; – Track usage with &lt;a href="https://aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;Amazon CloudWatch&lt;/a&gt;; optimize cost with &lt;a href="https://aws.amazon.com/ec2/spot/" rel="noopener noreferrer"&gt;Spot Instances&lt;/a&gt; and &lt;a href="https://aws.amazon.com/savingsplans/" rel="noopener noreferrer"&gt;Savings Plans&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;What I Learned from Cloud Quest’s First EC2 Exercise&lt;/strong&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F2s9x70nos0u30a1lwc51.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.amazonaws.com%2Fuploads%2Farticles%2F2s9x70nos0u30a1lwc51.png" alt="aws ec2 set up image summary" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 setup isn’t just “launch and forget” — you need to plan placement (AZs), security rules, and key pairs before launch.&lt;/li&gt;
&lt;li&gt;AWS services are deeply integrated — while setting up EC2, you naturally interact with &lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html" rel="noopener noreferrer"&gt;networking&lt;/a&gt;, &lt;a href="https://aws.amazon.com/ebs/" rel="noopener noreferrer"&gt;storage&lt;/a&gt;, and &lt;a href="https://aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;monitoring&lt;/a&gt; tools.&lt;/li&gt;
&lt;li&gt;The game forces you to think like a real AWS engineer — considering cost, resilience, and scalability from the start.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;Amazon EC2&lt;/a&gt; is more than just “a server in the cloud” — it’s a platform for building resilient, scalable, and global applications without owning a single physical machine.&lt;br&gt;
&lt;a href="https://aws.amazon.com/training/digital/aws-cloud-quest/" rel="noopener noreferrer"&gt;AWS Cloud Quest&lt;/a&gt; makes this real by putting you in scenarios that mirror what happens in production environments. By the time you’ve finished the first few quests, you’ll not only know how to launch EC2 instances — you’ll know why you launch them the way AWS best practices suggest.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ec2</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Mon, 04 Aug 2025 21:52:07 +0000</pubDate>
      <link>https://dev.to/stoicdavi/-19pk</link>
      <guid>https://dev.to/stoicdavi/-19pk</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/stoicdavi/your-files-just-vanished-and-amazon-s3-could-have-saved-you-1dm6" class="crayons-story__hidden-navigation-link"&gt;Your Files Just Vanished... And Amazon S3 Could Have Saved You!&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/stoicdavi" class="crayons-avatar  crayons-avatar--l  "&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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1870185%2F8b813ac4-c10c-441e-9f0b-eb586e36ec2d.jpeg" alt="stoicdavi profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/stoicdavi" class="crayons-story__secondary fw-medium m:hidden"&gt;
              David Nanjila
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                David Nanjila
                
              
              &lt;div id="story-author-preview-content-2751504" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/stoicdavi" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1870185%2F8b813ac4-c10c-441e-9f0b-eb586e36ec2d.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;David Nanjila&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/stoicdavi/your-files-just-vanished-and-amazon-s3-could-have-saved-you-1dm6" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 4 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/stoicdavi/your-files-just-vanished-and-amazon-s3-could-have-saved-you-1dm6" id="article-link-2751504"&gt;
          Your Files Just Vanished... And Amazon S3 Could Have Saved You!
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/s3"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;s3&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aws"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aws&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/stoicdavi/your-files-just-vanished-and-amazon-s3-could-have-saved-you-1dm6" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;7&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/stoicdavi/your-files-just-vanished-and-amazon-s3-could-have-saved-you-1dm6#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              2&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            7 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>s3</category>
      <category>aws</category>
    </item>
    <item>
      <title>Your Files Just Vanished... And Amazon S3 Could Have Saved You!</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Mon, 04 Aug 2025 21:42:16 +0000</pubDate>
      <link>https://dev.to/stoicdavi/your-files-just-vanished-and-amazon-s3-could-have-saved-you-1dm6</link>
      <guid>https://dev.to/stoicdavi/your-files-just-vanished-and-amazon-s3-could-have-saved-you-1dm6</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2Fia17logl6c8034j7e63m.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.amazonaws.com%2Fuploads%2Farticles%2Fia17logl6c8034j7e63m.png" alt="banner image" width="800" height="1200"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;The Storage Crisis Every Business Faces (And How to Never Face It Again)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Nightmare Scenario&lt;/strong&gt;&lt;br&gt;
Picture this: It’s Black Friday, your company’s biggest sales day of the year. Your e‑commerce website is experiencing 10× normal traffic when suddenly… crash. Your traditional web server buckles under the pressure, customers can’t access your site, and you’re watching potential revenue evaporate by the minute.&lt;/p&gt;

&lt;p&gt;But here’s an even worse scenario: You’re peacefully working on your laptop when suddenly it dies completely. Years of work, family photos, business documents – all gone in an instant. The panic sets in as you realize your last backup was… when exactly?&lt;br&gt;
These aren’t hypothetical disasters. They happen every day to businesses and individuals who haven’t discovered the power of &lt;strong&gt;&lt;a href="https://aws.amazon.com/s3/" rel="noopener noreferrer"&gt;Amazon S3&lt;/a&gt;&lt;/strong&gt;. Today, I’ll show you how S3 can transform these nightmares into minor inconveniences.&lt;/p&gt;
&lt;h2&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.amazonaws.com%2Fuploads%2Farticles%2Fex3wx8azne6niulqx9v9.png" alt=" " width="392" height="375"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What Makes S3 a Game‑Changer?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Amazon Web Services (AWS) didn’t just create another storage service when they launched &lt;a href="https://aws.amazon.com/s3/" rel="noopener noreferrer"&gt;S3&lt;/a&gt;&lt;/strong&gt; – they revolutionized how we think about data storage and website hosting. S3 isn’t just storage; it’s a highly durable, infinitely scalable platform that can serve as the backbone for everything from simple websites to enterprise data lakes.&lt;/p&gt;

&lt;p&gt;Here’s what sets S3 apart:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;99.999999999 % (11 9’s) durability&lt;/strong&gt; – Your data is virtually indestructible&lt;/li&gt;
&lt;li&gt;Automatic scaling – Handles traffic spikes from 10 visitors to 10 million without breaking a sweat&lt;/li&gt;
&lt;li&gt;Global availability – Access your data from anywhere, anytime&lt;/li&gt;
&lt;li&gt;Intelligent cost optimization – Automatically moves data to cheaper storage classes based on access patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unlike traditional servers that crash under pressure, S3 automatically scales to handle virtually unlimited traffic, ensuring your website stays online when it matters most.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;How to Master AWS S3: Your Learning Roadmap&lt;/strong&gt;&lt;br&gt;
The best way to master AWS is through hands‑on experience combined with structured learning. Here’s my battle‑tested approach:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start with &lt;a href="https://skillbuilder.aws/learn" rel="noopener noreferrer"&gt;AWS SkillBuilder&lt;/a&gt;&lt;/strong&gt; and the &lt;em&gt;Free&lt;/em&gt; &lt;strong&gt;&lt;a href="https://skillbuilder.aws/learn/94T2BEN85A/aws-cloud-practitioner-essentials/8D79F3AVR7" rel="noopener noreferrer"&gt;AWS Cloud Practitioner Essentials&lt;/a&gt;&lt;/strong&gt; course.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hands‑on labs and Cloud Quest – Gamified learning that makes complex concepts stick&lt;/li&gt;
&lt;li&gt;Subscription for advanced courses and practice exams&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get Your Hands Dirty&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a free AWS account and explore the &lt;a href="https://aws.amazon.com/free/" rel="noopener noreferrer"&gt;Free Tier&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Follow &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html" rel="noopener noreferrer"&gt;AWS documentation&lt;/a&gt;&lt;/strong&gt; step‑by‑step tutorials&lt;/li&gt;
&lt;li&gt;Join AWS community forums and local user groups&lt;/li&gt;
&lt;li&gt;Build actual projects, not just follow tutorials&lt;/li&gt;
&lt;li&gt;Consider AWS certifications like the AWS Certified Cloud Practitioner&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro tip&lt;/strong&gt;: Don’t just watch videos – build Muscle memory from navigating the console.&lt;/p&gt;


&lt;h3&gt;
  
  
  The Most Powerful S3 Use Cases
&lt;/h3&gt;

&lt;p&gt;Based on real‑world implementations and AWS Cloud Quest exercises, these are the most compelling ways to leverage S3:&lt;/p&gt;
&lt;h2&gt;
  
  
  Static Website Hosting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Transform your website hosting from a liability into an asset:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Perfect for blogs, portfolios, documentation sites, marketing pages&lt;/li&gt;
&lt;li&gt;Zero server maintenance, automatic scaling, 99.99 % uptime&lt;/li&gt;
&lt;li&gt;Works seamlessly with &lt;strong&gt;Amazon CloudFront Content Delivery Network(CDN)&lt;/strong&gt; for lightning‑fast global delivery.&lt;/li&gt;
&lt;li&gt;Cost: Under \$5/month&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Bulletproof Data Backup and Archival
&lt;/h3&gt;

&lt;p&gt;Never lose important data again:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;11 9’s durability means your data is safer than in most vaults&lt;/li&gt;
&lt;li&gt;Multiple storage classes optimize cost based on access frequency&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lifecycle policies&lt;/strong&gt; to move old data to cheaper tiers, learn more &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_LifecycleRule.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross‑Region Replication&lt;/strong&gt; protects against regional disasters&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Global Content Distribution
&lt;/h3&gt;

&lt;p&gt;Serve images, videos, docs at scale:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use CloudFront edge locations for ultra-fast delivery&lt;/li&gt;
&lt;li&gt;Version control and granular IAM permissions for governance&lt;/li&gt;
&lt;li&gt;Automatic compression and optimization reduce bandwidth&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Data Lakes and Big Data Analytics
&lt;/h3&gt;

&lt;p&gt;Store structured + unstructured data at any scale:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrates with Athena, Redshift, EMR&lt;/li&gt;
&lt;li&gt;Supports multiple formats: JSON, Parquet, CSV&lt;/li&gt;
&lt;li&gt;Query data directly from S3 without moving it to databases&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Modern Application Storage
&lt;/h3&gt;

&lt;p&gt;Build cloud-native apps from the ground up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mobile/web apps can upload/download directly to S3&lt;/li&gt;
&lt;li&gt;RESTful APIs integrate with any platform or language&lt;/li&gt;
&lt;li&gt;Event‑driven processing triggers workflows (e.g. Lambda)&lt;/li&gt;
&lt;li&gt;Serverless – No thinking about patches or scaling&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;strong&gt;Step‑by‑Step: Host Your Website on S3 in 5 Minutes&lt;/strong&gt;&lt;br&gt;
Ready to see S3 work? Here’s your checklist: Ensure you have created a free tier aws account &lt;a href="https://aws.amazon.com/free/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
Ensure you have a static website files with you. Make sure it has an index.html file.&lt;/p&gt;

&lt;p&gt;✅ Step 1: Log in to your aws management console using your email and password.&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.amazonaws.com%2Fuploads%2Farticles%2F6a6kvdbtno8iug5ysujt.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.amazonaws.com%2Fuploads%2Farticles%2F6a6kvdbtno8iug5ysujt.png" alt="aws management console showing the console login page" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ Step 2: Type s3 in the search bar as shown below and then click on s3 to open aws s3 landing page&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.amazonaws.com%2Fuploads%2Farticles%2Fez8tgpue0ck9gbjpokw6.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.amazonaws.com%2Fuploads%2Farticles%2Fez8tgpue0ck9gbjpokw6.png" alt="aws management console showing search for s3" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ Step 3: Click on create a bucket and create a bucket using a unique name e.g "your-firstname_3234343" the name unique. Ensure to add some random numbers to make the name of your bucket unique.&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.amazonaws.com%2Fuploads%2Farticles%2Fwdcqi9lthpm25sf6qokd.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.amazonaws.com%2Fuploads%2Farticles%2Fwdcqi9lthpm25sf6qokd.png" alt="S3 landing page with create bucket button" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Uncheck block all public access for this bucket and check and confirm as show&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.amazonaws.com%2Fuploads%2Farticles%2Fhbeav1son9g88oavwlgq.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.amazonaws.com%2Fuploads%2Farticles%2Fhbeav1son9g88oavwlgq.png" alt="s3 Backet naming" width="800" height="249"&gt;&lt;/a&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F4b04yz8lmc1tq03vifyy.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.amazonaws.com%2Fuploads%2Farticles%2F4b04yz8lmc1tq03vifyy.png" alt="unblocking public access to the s3 bucket" width="800" height="353"&gt;&lt;/a&gt;&lt;br&gt;
Scroll down and then click create bucket.&lt;br&gt;
Once successful you will see a green banner at the top with a bucket created successful message, click on view details on the banner to see the bucket details.&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fogm2hb44t93kdafy56ih.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.amazonaws.com%2Fuploads%2Farticles%2Fogm2hb44t93kdafy56ih.png" alt="Bucket creation success" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ Step 4: On the bucket details page, click on upload then add files to add files, it will open your local machine, select the static files of your website and then click upload at your bottom right to upload them&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.amazonaws.com%2Fuploads%2Farticles%2F4v32dx4cpojbc2s12ywl.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.amazonaws.com%2Fuploads%2Farticles%2F4v32dx4cpojbc2s12ywl.png" alt="bucket details" width="800" height="177"&gt;&lt;/a&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F7zvl9ilf995eh2l1q3eb.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.amazonaws.com%2Fuploads%2Farticles%2F7zvl9ilf995eh2l1q3eb.png" alt="bucket page" width="800" height="177"&gt;&lt;/a&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F8037s9rrcddct6s5u5da.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.amazonaws.com%2Fuploads%2Farticles%2F8037s9rrcddct6s5u5da.png" alt="bucket interface" width="800" height="210"&gt;&lt;/a&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fj4stx4mdk2alg4iunzwl.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.amazonaws.com%2Fuploads%2Farticles%2Fj4stx4mdk2alg4iunzwl.png" alt="bucket interface" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ Step 5: After you have successfully uploaded you files, click on the properties, then scroll down, you will see static website hosting currently disable, click edit and select enable radio button.&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.amazonaws.com%2Fuploads%2Farticles%2Fumpflk0fkxp2js737ewi.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.amazonaws.com%2Fuploads%2Farticles%2Fumpflk0fkxp2js737ewi.png" alt="Uploading files" width="800" height="194"&gt;&lt;/a&gt;&lt;br&gt;
Fill in the index document as index.html and error document and error.html. Scroll down and click save changes.&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Ftpkk5s16sjrqyfo3tfk3.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.amazonaws.com%2Fuploads%2Farticles%2Ftpkk5s16sjrqyfo3tfk3.png" alt="Setting up static website" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ Step 6: set the backet policy to allow anyone to access the object in the bucket.&lt;/p&gt;

&lt;p&gt;Click on the permissions, edit bucket policy, copy the policy a bellow and paste it, change the "your-bucket-name" your the name of your s3 bucket. Scroll down and click saver changes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; {
   "Version": "2012-10-17",
   "Statement": [
     {
       "Sid": "PublicReadGetObject",
       "Effect": "Allow",
       "Principal": "*",
       "Action": "s3:GetObject",
       "Resource": "arn:aws:s3:::your-bucket-name/*"
     }
   ]
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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.amazonaws.com%2Fuploads%2Farticles%2Feu5k3e67x3t4fnw3o5b2.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.amazonaws.com%2Fuploads%2Farticles%2Feu5k3e67x3t4fnw3o5b2.png" alt="The policy set up" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on properties and scroll down to the static website hosting and you static website live when you click on the link bucket website endpoint.&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.amazonaws.com%2Fuploads%2Farticles%2Fbbnmzk3dnx7piwb6yrk2.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.amazonaws.com%2Fuploads%2Farticles%2Fbbnmzk3dnx7piwb6yrk2.png" alt="The static website URL" width="800" height="410"&gt;&lt;/a&gt;&lt;br&gt;
You can see the static website ready and it is now accessible all the world.&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F5xdtwan0wuv3nvshrq8k.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.amazonaws.com%2Fuploads%2Farticles%2F5xdtwan0wuv3nvshrq8k.png" alt="Static website" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The format of your static website will be as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://your-unique-website-name.s3-website-region.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt;: Add the &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html" rel="noopener noreferrer"&gt;CloudFront CDN&lt;/a&gt;&lt;/strong&gt; for HTTPS and global performance, then point your custom domain using &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html" rel="noopener noreferrer"&gt;Route 53&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Battle‑Tested Best Practices&lt;/strong&gt;&lt;br&gt;
Following AWS Well‑Architected Framework best practices can save a ton of headaches. Learn more here: &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/wellarchitected/2024-06-27/framework/welcome.html" rel="noopener noreferrer"&gt;AWS Well‑Architected Framework&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security First&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable &lt;strong&gt;bucket versioning&lt;/strong&gt; – Undo accidental deletions&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html" rel="noopener noreferrer"&gt;IAM roles and policies&lt;/a&gt;&lt;/strong&gt; to enforce least privilege.&lt;/li&gt;
&lt;li&gt;Enable &lt;strong&gt;encryption&lt;/strong&gt; – SSE‑S3 or SSE‑KMS for data at rest&lt;/li&gt;
&lt;li&gt;Block public access by default; only make specific objects public&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;MFA delete&lt;/strong&gt; – Higher security for important buckets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Performance Optimization&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy &lt;strong&gt;CloudFront&lt;/strong&gt; – Cut latency by 60‑80 % globally&lt;/li&gt;
&lt;li&gt;Smart object naming to avoid “hotspotting”&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;multipart uploads&lt;/strong&gt; for large files (&amp;gt; 100 MB)&lt;/li&gt;
&lt;li&gt;Enable &lt;strong&gt;Transfer Acceleration&lt;/strong&gt; for fast uploads from distant locations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost Management That Actually Works&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;S3 Intelligent‑Tiering&lt;/strong&gt; automatically moves objects based on access.&lt;/li&gt;
&lt;li&gt;Implement &lt;strong&gt;lifecycle policies&lt;/strong&gt; to shift older data to Glacier or Deep Archive&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;S3 Storage Lens&lt;/strong&gt; to monitor and analyze usage&lt;/li&gt;
&lt;li&gt;Regularly review access patterns and adjust storage classes quarterly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Reliability and Disaster Recovery&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set up &lt;strong&gt;Cross‑Region Replication&lt;/strong&gt; for geo‑redundancy&lt;/li&gt;
&lt;li&gt;Leverage &lt;strong&gt;S3 Event Notifications&lt;/strong&gt; to trigger workflows + alerts&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Amazon CloudWatch&lt;/strong&gt; for monitoring and alarms&lt;/li&gt;
&lt;li&gt;Build apps to tolerate eventual consistency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Operational Excellence&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maintain a consistent tagging strategy for cost tracking&lt;/li&gt;
&lt;li&gt;Use Infrastructure as Code (CloudFormation, CDK) for repeatable deployments&lt;/li&gt;
&lt;li&gt;Enable detailed logging using AWS CloudTrail and S3 server access logs&lt;/li&gt;
&lt;li&gt;Create runbooks for common situations&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;The Paradigm Shift That Changes Everything&lt;/strong&gt;&lt;br&gt;
My first AWS Cloud Quest on S3 static website hosting was eye‑opening. It shifted my infrastructure mindset entirely.&lt;br&gt;
Before S3, I lost sleep over capacity planning and patching schedules. I provisioned servers “just in case,” even when traffic spikes felt unpredictable. I held my breath every time big events rolled around.&lt;br&gt;
With S3, all of that goes away: No patching, no over‑provisioning, no 3 AM panic texts. You get high uptime, broad availability, and pay‑as‑you‑go pricing that usually costs pennies for a simple project.&lt;/p&gt;




&lt;p&gt;Savings are more than just dollars—they’re a shift in philosophy: From scaling servers to scaling architectural thinking.&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.amazonaws.com%2Fuploads%2Farticles%2Fbh4i110bv14wtwq4ouys.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.amazonaws.com%2Fuploads%2Farticles%2Fbh4i110bv14wtwq4ouys.png" alt="aws s3 celebration" width="531" height="760"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Your Next Steps: From Theory to Practice&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This Week&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create your AWS Free Tier account&lt;/li&gt;
&lt;li&gt;Complete &lt;em&gt;AWS Cloud Practitioner Essentials&lt;/em&gt; on SkillBuilder&lt;/li&gt;
&lt;li&gt;Build your first S3‑hosted website using the checklist above&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Bottom Line&lt;/strong&gt;&lt;br&gt;
S3 is not just storage—it’s a new way to think about building for the cloud. Paired with CloudFront, Route 53, and Certificate Manager, you can build globally distributed, high‑availability systems that used to cost enterprise budgets.&lt;br&gt;
The companies that thrive in the next decade won’t operate the largest server farms—they’ll master serverless, cloud‑native design. S3 is your gateway.&lt;/p&gt;

&lt;p&gt;You don’t have to lose your files. Your website doesn’t have to crash. Your infrastructure doesn’t need to cost a fortune. S3 has solved these problems—and more.&lt;br&gt;
The only question is: &lt;strong&gt;When will you start taking advantage of it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;❓ Ready to get started? Create your &lt;a href="https://aws.amazon.com/free/" rel="noopener noreferrer"&gt;AWS Free Tier&lt;/a&gt; account today and build your first S3‑hosted website. Your future self will thank you—especially during the next Black Friday rush or even when your machine crashes and your data is stored in S3.&lt;/p&gt;

</description>
      <category>s3</category>
      <category>aws</category>
    </item>
    <item>
      <title>Bringing Back the 80s: My Journey Creating Robotron 2084 in HTML5 using AmazonQ CLI</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Mon, 07 Jul 2025 13:35:18 +0000</pubDate>
      <link>https://dev.to/stoicdavi/bringing-back-the-80s-my-journey-creating-robotron-2084-in-html5-using-amazonq-cli-ae6</link>
      <guid>https://dev.to/stoicdavi/bringing-back-the-80s-my-journey-creating-robotron-2084-in-html5-using-amazonq-cli-ae6</guid>
      <description>&lt;h2&gt;
  
  
  🕹️ The Nostalgia Hit
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fj8o4e3qiq89adqqmc24q.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.amazonaws.com%2Fuploads%2Farticles%2Fj8o4e3qiq89adqqmc24q.png" alt=" The robotron landing game landing page" width="800" height="645"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember the golden age of arcade gaming? The satisfying &lt;em&gt;click&lt;/em&gt; of buttons, the glow of CRT monitors, and the pure adrenaline rush of defending humanity against endless waves of robots? That's exactly what inspired me to recreate &lt;strong&gt;Robotron 2084&lt;/strong&gt; - one of the most intense twin-stick shooters ever made.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎮 &lt;a href="https://robotron-2084.netlify.app/index.html" rel="noopener noreferrer"&gt;PLAY THE GAME NOW - LIVE DEMO&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Why Robotron 2084?
&lt;/h2&gt;

&lt;p&gt;Released in 1982, Robotron 2084 was revolutionary. It introduced the twin-stick control scheme that's now standard in modern shooters, and its frantic "save the humans" gameplay created an emotional connection rarely seen in arcade games.&lt;/p&gt;

&lt;p&gt;What makes it special:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dual-stick controls&lt;/strong&gt;: Move with one hand, shoot with the other&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moral complexity&lt;/strong&gt;: You're not just surviving - you're protecting innocent lives&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Escalating tension&lt;/strong&gt;: Each wave gets exponentially harder&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pure skill-based gameplay&lt;/strong&gt;: No power-ups, no gimmicks - just you vs the machines
How Amazon Q Developer Transformed My Game Development Journey&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🤖 The AI-Powered Development Experience
&lt;/h2&gt;

&lt;p&gt;When I set out to create a retro game collection, I had no idea that Amazon Q Developer would become my most valuable coding companion. What started as a simple idea to recreate Robotron 2084 turned into a masterclass in AI-assisted development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎮 &lt;a href="https://robotron-2084.netlify.app/index.html" rel="noopener noreferrer"&gt;PLAY THE RESULT - LIVE DEMO&lt;/a&gt;&lt;/strong&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fl54ned8ksyui00xrizlx.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.amazonaws.com%2Fuploads%2Farticles%2Fl54ned8ksyui00xrizlx.png" alt="The live game play interface" width="800" height="645"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 From Idea to Implementation in Record Time
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Challenge
&lt;/h3&gt;

&lt;p&gt;I wanted to build:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A twin-stick shooter (Robotron 2084)&lt;/li&gt;
&lt;li&gt;A memory game (Color Memory Challenge)&lt;/li&gt;
&lt;li&gt;Professional documentation&lt;/li&gt;
&lt;li&gt;A polished user experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Traditional approach:&lt;/strong&gt; Weeks of research, trial and error, debugging&lt;br&gt;
&lt;strong&gt;With Amazon Q:&lt;/strong&gt; Completed within a few hours with professional quality&lt;/p&gt;
&lt;h2&gt;
  
  
  🛠️ How Amazon Q Accelerated Development
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. &lt;strong&gt;Instant Code Generation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Instead of writing the whole code from scratch:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Help me create a twin-stick shooter game"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Q:&lt;/strong&gt; Generated complete game architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Robotron2084&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canvas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gameCanvas&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2d&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;speed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="c1"&gt;// Complete game state management&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;
  
  
  2. &lt;strong&gt;Smart Problem Solving&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When I needed collision detection:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "The bullets aren't hitting robots properly"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Q:&lt;/strong&gt; Immediately identified the issue and provided optimized solution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;checkCollisions&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bullets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;bullet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bulletIndex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;robots&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;robot&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;robotIndex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;distance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bullet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;robot&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;bullet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;robot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// Perfect collision logic&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. &lt;strong&gt;Professional File Organization&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Help me separate HTML, CSS, and JavaScript files"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Q:&lt;/strong&gt; Instantly restructured the entire project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Created modular file architecture&lt;/li&gt;
&lt;li&gt;Generated clean HTML structure&lt;/li&gt;
&lt;li&gt;Separated styling into dedicated CSS files&lt;/li&gt;
&lt;li&gt;Organized JavaScript into logical components&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎯 Specific Ways Amazon Q Helped
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Code Quality &amp;amp; Best Practices
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Suggested ES6 classes&lt;/strong&gt; for better organization&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recommended requestAnimationFrame&lt;/strong&gt; for smooth 60fps gameplay&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implemented efficient collision detection&lt;/strong&gt; algorithms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Added proper error handling&lt;/strong&gt; and edge cases&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  User Experience Design
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Created landing page&lt;/strong&gt; with clear instructions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Designed intuitive navigation&lt;/strong&gt; between pages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Added responsive design&lt;/strong&gt; for different screen sizes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implemented accessibility features&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Documentation Excellence
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generated comprehensive README&lt;/strong&gt; with proper structure&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wrote professional blog posts&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Added inline code comments&lt;/strong&gt; for maintainability&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💡 The Amazon Q Advantage
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Context Awareness&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon Q understood my project goals and maintained consistency across all files. When I asked for a landing page, it automatically matched the retro aesthetic of the game.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Iterative Improvement&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Add a back button to return to the landing page"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Q:&lt;/strong&gt; Not only added the button but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Styled it to match the game theme&lt;/li&gt;
&lt;li&gt;Positioned it unobtrusively&lt;/li&gt;
&lt;li&gt;Added hover effects&lt;/li&gt;
&lt;li&gt;Updated documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Professional Polish&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon Q didn't just write code - it created a professional product:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clean file structure&lt;/li&gt;
&lt;li&gt;Consistent naming conventions&lt;/li&gt;
&lt;li&gt;Proper version control practices&lt;/li&gt;
&lt;li&gt;Marketing materials ready for publication&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔧 Technical Achievements with Amazon Q
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Game Engine Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;60 FPS game loop&lt;/strong&gt; with optimized rendering&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Particle system&lt;/strong&gt; for explosions and effects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progressive difficulty&lt;/strong&gt; with wave-based gameplay&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collision detection&lt;/strong&gt; with pixel-perfect accuracy&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Modern Web Standards
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML5 Canvas&lt;/strong&gt; for high-performance graphics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS3 animations&lt;/strong&gt; and responsive design&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vanilla JavaScript&lt;/strong&gt; with no external dependencies&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cross-browser compatibility&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Professional Documentation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Technical documentation&lt;/strong&gt; for developers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blog posts&lt;/strong&gt; for marketing and engagement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;README&lt;/strong&gt; with clear setup instructions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📈 Development Timeline Comparison
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Without Amazon Q (Estimated):
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Week 1-2:&lt;/strong&gt; Research game development patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 3-4:&lt;/strong&gt; Build basic game mechanics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 5-6:&lt;/strong&gt; Debug collision detection and performance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 7-8:&lt;/strong&gt; Create user interface and styling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 9-10:&lt;/strong&gt; Write documentation and polish&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  With Amazon Q (Actual):
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Complete Robotron 2084 game with all features&lt;/li&gt;
&lt;li&gt;Add Color Memory Challenge game&lt;/li&gt;
&lt;li&gt;Create landing page and navigation&lt;/li&gt;
&lt;li&gt;Generate all documentation and blog posts&lt;/li&gt;
&lt;li&gt;Polish, test, and deploy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Result: 10 weeks → 1 hours (100% time savings)&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Lessons Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;AI as a Coding Partner&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon Q isn't just a code generator - it's a development partner that understands context, suggests improvements, and maintains consistency.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Focus on Ideas, Not Implementation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Instead of getting bogged down in syntax and boilerplate, I could focus on game design and user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Professional Quality from the first minute&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon Q's suggestions follow industry best practices, resulting in production-ready code immediately.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Documentation Matters&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon Q emphasized the importance of good documentation and made it effortless to create.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔮 The Future of AI-Assisted Development
&lt;/h2&gt;

&lt;p&gt;This project showed me that AI development tools like Amazon Q are game-changers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster prototyping&lt;/strong&gt; enables more experimentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Higher quality code&lt;/strong&gt; from the start&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better documentation&lt;/strong&gt; improves maintainability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Professional polish&lt;/strong&gt; without the time investment&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💭 For Fellow Developers
&lt;/h2&gt;

&lt;p&gt;If you're considering AI-assisted development:&lt;/p&gt;

&lt;h3&gt;
  
  
  Do This:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Be specific&lt;/strong&gt; in your requests&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterate and refine&lt;/strong&gt; based on AI suggestions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learn from the code&lt;/strong&gt; AI generates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Focus on the big picture&lt;/strong&gt; while AI handles details&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Expect This:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dramatic time savings&lt;/strong&gt; on routine tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Higher code quality&lt;/strong&gt; through best practices&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better documentation&lt;/strong&gt; and organization&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;More time for creative problem-solving&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎯 Try It Yourself
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;🎮 &lt;a href="https://robotron-2084.netlify.app/index.html" rel="noopener noreferrer"&gt;PLAY THE GAMES&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;📁 &lt;a href="https://github.com/david-nanjila/GameChallengeAmazonQ" rel="noopener noreferrer"&gt;VIEW SOURCE CODE&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔗 Connect &amp;amp; Discuss
&lt;/h2&gt;

&lt;p&gt;Want to discuss AI-assisted development or game creation?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/david-nanjila/" rel="noopener noreferrer"&gt;David Nanjila&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;X (Twitter):&lt;/strong&gt; &lt;a href="https://x.com/DavidNanji9396" rel="noopener noreferrer"&gt;@DavidNanji9396&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/stoicdavi/" rel="noopener noreferrer"&gt;david-nanjila&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💬 Join the Conversation
&lt;/h2&gt;

&lt;p&gt;Have you used AI tools for development? What was your experience? Share your thoughts and let's discuss the future of AI-assisted coding!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Ready to supercharge your development with AI? Amazon Q Developer is waiting to transform your next project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀 &lt;a href="https://aws.amazon.com/q/developer/" rel="noopener noreferrer"&gt;START YOUR AI DEVELOPMENT JOURNEY&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>buildgameschallenge</category>
      <category>amazonqdevcli</category>
    </item>
    <item>
      <title>Deploying Your First Server with Terraform on AWS: A Beginner's Guide</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Sun, 06 Jul 2025 21:29:15 +0000</pubDate>
      <link>https://dev.to/stoicdavi/deploying-your-first-server-with-terraform-on-aws-a-beginners-guide-217h</link>
      <guid>https://dev.to/stoicdavi/deploying-your-first-server-with-terraform-on-aws-a-beginners-guide-217h</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2Fa4zyio6ns48bkumpy51y.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.amazonaws.com%2Fuploads%2Farticles%2Fa4zyio6ns48bkumpy51y.png" alt="AWS Console showing my provisioned vpc" width="800" height="412"&gt;&lt;/a&gt;## Introduction&lt;/p&gt;

&lt;p&gt;Today marks Day 3 of my 30-Day Terraform Challenge, and what an exciting milestone it's been! I successfully deployed my first web server using Infrastructure as Code (IaC) with Terraform. If you're new to Terraform or cloud infrastructure, this post will walk you through the journey and key learnings from building basic AWS infrastructure from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Accomplished Today
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Understanding Terraform Fundamentals
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Provider Blocks&lt;/strong&gt;: Learned how to configure AWS as my cloud provider&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource Blocks&lt;/strong&gt;: Mastered creating and managing AWS resources&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Sources&lt;/strong&gt;: Used data sources to fetch dynamic information like availability zones&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Built Complete Infrastructure
&lt;/h3&gt;

&lt;p&gt;I created a fully functional web server infrastructure including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VPC (Virtual Private Cloud)&lt;/strong&gt;: My own private network in AWS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public Subnet&lt;/strong&gt;: Where my server lives with internet access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internet Gateway&lt;/strong&gt;: Enables internet connectivity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Group&lt;/strong&gt;: Acts as a firewall for my server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EC2 Instance&lt;/strong&gt;: The actual web server running Apache&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Architecture
&lt;/h2&gt;

&lt;p&gt;Here's what I built:&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.amazonaws.com%2Fuploads%2Farticles%2F2vsedc22g5mv1uns1m2j.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.amazonaws.com%2Fuploads%2Farticles%2F2vsedc22g5mv1uns1m2j.png" alt="Infrusttructure diagram showing what I built" width="800" height="627"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Code Highlights
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Setting Up the 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-west-2"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Creating the VPC
&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_vpc"&lt;/span&gt; &lt;span class="s2"&gt;"vpc"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;cidr_block&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;vpc_cidr&lt;/span&gt;
  &lt;span class="nx"&gt;enable_dns_hostnames&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="nx"&gt;enable_dns_support&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&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;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;vpc_name&lt;/span&gt;
    &lt;span class="nx"&gt;Environment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"demo_environment"&lt;/span&gt;
    &lt;span class="nx"&gt;Terraform&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"true"&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;
  
  
  Deploying the Web Server
&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;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;aws_ami&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;amazon_linux&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&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;subnet_id&lt;/span&gt;                   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_subnet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;public_subnet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;
  &lt;span class="nx"&gt;vpc_security_group_ids&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_server_sg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="nx"&gt;associate_public_ip_address&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

  &lt;span class="nx"&gt;user_data&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;-&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
    #!/bin/bash
    yum update -y
    yum install -y httpd
    systemctl start httpd
    systemctl enable httpd
    echo "&amp;lt;h1&amp;gt;Hello from your first Terraform server!&amp;lt;/h1&amp;gt;" &amp;gt; /var/www/html/index.html
&lt;/span&gt;&lt;span class="no"&gt;  EOF

&lt;/span&gt;  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&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;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;instance_name&lt;/span&gt;
    &lt;span class="nx"&gt;Environment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"demo_environment"&lt;/span&gt;
    &lt;span class="nx"&gt;Terraform&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"true"&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;h2&gt;
  
  
  Challenges I Overcame
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Invalid Index Error
&lt;/h3&gt;

&lt;p&gt;Got confused with resource naming when referencing subnets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Invalid index
The given key does not identify an element in this collection value.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Ensured the key names matched exactly between variable definitions and resource references.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  1. Infrastructure as Code Benefits
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reproducibility&lt;/strong&gt;: Can recreate the same infrastructure anywhere&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version Control&lt;/strong&gt;: Infrastructure changes are tracked like code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation&lt;/strong&gt;: No more manual clicking in AWS console&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Terraform Best Practices
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use variables for flexibility&lt;/li&gt;
&lt;li&gt;Tag all resources for better organization&lt;/li&gt;
&lt;li&gt;Use data sources for dynamic values&lt;/li&gt;
&lt;li&gt;Keep security groups restrictive but functional&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. AWS Networking Basics
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;VPCs provide isolated network environments&lt;/li&gt;
&lt;li&gt;Subnets segment your network&lt;/li&gt;
&lt;li&gt;Internet Gateways enable internet access&lt;/li&gt;
&lt;li&gt;Security Groups act as virtual firewalls at instance level&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Result
&lt;/h2&gt;

&lt;p&gt;After running &lt;code&gt;terraform apply&lt;/code&gt;, I had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ A fully functional web server&lt;/li&gt;
&lt;li&gt;✅ Accessible via public IP&lt;/li&gt;
&lt;li&gt;✅ Serving a custom HTML page&lt;/li&gt;
&lt;li&gt;✅ All infrastructure defined as code&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Ffqc0i39hom9cqfsexxcc.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.amazonaws.com%2Fuploads%2Farticles%2Ffqc0i39hom9cqfsexxcc.png" alt="Vs code on the left the server display on the right" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The server displays: "Hello from your first Terraform server!" along with its IP and instance ID.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start Simple&lt;/strong&gt;: Begin with basic infrastructure before adding complexity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read Error Messages&lt;/strong&gt;: Terraform provides clear error messages - read them carefully&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Variables&lt;/strong&gt;: Makes your code reusable and flexible&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Incrementally&lt;/strong&gt;: Apply changes step by step to catch issues early&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document Everything&lt;/strong&gt;: Good naming and tags make infrastructure manageable&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Tomorrow I'll be exploring more advanced Terraform features and expanding this infrastructure. The foundation is solid, and I'm excited to build upon it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources Used
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Book&lt;/strong&gt;: &lt;a href="https://www.amazon.com/Terraform-Running-Infrastructure-Configuration-Management/dp/1492046906" rel="noopener noreferrer"&gt;Terraform: Up &amp;amp; Running on Amazon&lt;/a&gt; - Chapter 2&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Labs&lt;/strong&gt;: 

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/btkrausen/hashicorp/blob/master/terraform/Hands-On%20Labs/Section%2004%20-%20Understand%20Terraform%20Basics/04%20-%20Intro_to_the_Terraform_Provider_Block.md" rel="noopener noreferrer"&gt;Configure AWS Terraform Providers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/btkrausen/hashicorp/blob/master/terraform/Hands-On%20Labs/Section%2004%20-%20Understand%20Terraform%20Basics/05%20-%20Intro_to_the_Terraform_Resource_Block.md" rel="noopener noreferrer"&gt;Configure AWS Resource Blocks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Documentation&lt;/strong&gt;: 

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs" rel="noopener noreferrer"&gt;Terraform AWS Provider&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;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language" rel="noopener noreferrer"&gt;Terraform Configuration Language&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Deploying your first server with Terraform feels like magic! What used to require multiple manual steps in the AWS console now happens with a single &lt;code&gt;terraform apply&lt;/code&gt; command. The learning curve is worth it - Infrastructure as Code is definitely the way forward.&lt;/p&gt;

&lt;p&gt;If you're starting your Terraform journey, don't be intimidated by the errors. They're learning opportunities that make you understand the underlying concepts better.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post is part of my 30-Day Terraform Challenge. Follow along for more Infrastructure as Code adventures!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>30daytfchallenge</category>
      <category>terraform</category>
      <category>aws</category>
    </item>
    <item>
      <title>Infrastructure as Code (IaC): Revolutionizing DevOps</title>
      <dc:creator>David Nanjila</dc:creator>
      <pubDate>Tue, 01 Jul 2025 19:09:27 +0000</pubDate>
      <link>https://dev.to/stoicdavi/infrastructure-as-code-iac-revolutionizing-devops-4jbo</link>
      <guid>https://dev.to/stoicdavi/infrastructure-as-code-iac-revolutionizing-devops-4jbo</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today's rapidly evolving tech landscape, managing infrastructure efficiently has become a critical challenge for organizations of all sizes. Traditional methods of provisioning and managing infrastructure through manual processes and custom scripts are no longer sufficient to meet the demands of modern application development and deployment. This is where Infrastructure as Code (IaC) comes in as a game-changing approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Infrastructure as Code?
&lt;/h2&gt;

&lt;p&gt;Infrastructure as Code (IaC) is a methodology that allows you to manage and provision your infrastructure through code rather than manual processes. Instead of clicking through console interfaces or running ad-hoc scripts, IaC enables you to define your infrastructure using configuration files that can be versioned, shared, and reused.&lt;/p&gt;

&lt;p&gt;With IaC, infrastructure resources like virtual machines, networks, load balancers, and connection topologies are defined using a high-level configuration syntax. This approach makes it possible to manage your infrastructure using the same versioning systems you use for your application code, such as Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Benefits of Infrastructure as Code
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Speed and Efficiency
&lt;/h3&gt;

&lt;p&gt;IaC dramatically accelerates the infrastructure provisioning process. What used to take days or weeks to set up manually can now be accomplished in minutes or hours. This acceleration is crucial for organizations adopting DevOps practices and aiming for rapid delivery cycles.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Consistency and Standardization
&lt;/h3&gt;

&lt;p&gt;By defining infrastructure through code, you eliminate the inconsistencies that arise from manual configurations. Every deployment follows the same pattern, reducing the "it works on my machine" syndrome and ensuring consistent environments across development, testing, and production.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Version Control and History
&lt;/h3&gt;

&lt;p&gt;Infrastructure configurations can be stored in version control systems, providing a complete history of changes. This capability allows teams to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Track who made what changes and when&lt;/li&gt;
&lt;li&gt;Roll back to previous configurations if needed&lt;/li&gt;
&lt;li&gt;Understand the evolution of the infrastructure over time&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Cost Reduction
&lt;/h3&gt;

&lt;p&gt;IaC reduces costs in multiple ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automation reduces human error, which can be costly to fix&lt;/li&gt;
&lt;li&gt;Resources can be provisioned only when needed and deprovisioned when not in use&lt;/li&gt;
&lt;li&gt;Standardization leads to more efficient resource utilization&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Risk Mitigation
&lt;/h3&gt;

&lt;p&gt;With infrastructure defined as code, changes can be tested before being applied to production environments. This testing capability significantly reduces the risk of outages and security vulnerabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Documentation as Code
&lt;/h3&gt;

&lt;p&gt;The IaC configuration itself serves as documentation. New team members can quickly understand the infrastructure by reading the code, rather than relying on potentially outdated wiki pages or tribal knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Disaster Recovery
&lt;/h3&gt;

&lt;p&gt;In case of a disaster, IaC allows you to quickly rebuild your entire infrastructure from scratch, ensuring business continuity and reducing downtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terraform: A Leading IaC Tool
&lt;/h2&gt;

&lt;p&gt;Among the various IaC tools available, HashiCorp's Terraform has emerged as one of the most popular choices. Terraform uses a declarative approach where you specify the desired end state of your infrastructure, and it figures out how to achieve that state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Terraform
&lt;/h2&gt;

&lt;p&gt;Terraform installation is straightforward across different operating systems:&lt;/p&gt;

&lt;h3&gt;
  
  
  For Linux (Ubuntu/Debian)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Add HashiCorp GPG key&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://apt.releases.hashicorp.com/gpg | &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-key add -

&lt;span class="c"&gt;# Add HashiCorp repository&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-add-repository &lt;span class="s2"&gt;"deb [arch=amd64] https://apt.releases.hashicorp.com &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;lsb_release &lt;span class="nt"&gt;-cs&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; main"&lt;/span&gt;

&lt;span class="c"&gt;# Update and install Terraform&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;terraform

&lt;span class="c"&gt;# Verify installation&lt;/span&gt;
terraform &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For macOS (using Homebrew)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install Homebrew if not already installed&lt;/span&gt;
/bin/bash &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="c"&gt;# Install Terraform&lt;/span&gt;
brew tap hashicorp/tap
brew &lt;span class="nb"&gt;install &lt;/span&gt;hashicorp/tap/terraform

&lt;span class="c"&gt;# Verify installation&lt;/span&gt;
terraform &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For Windows (using Chocolatey)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install Chocolatey if not already installed&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Set-ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Bypass&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Scope&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Process&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Force&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Net.ServicePointManager&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;SecurityProtocol&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;System.Net.ServicePointManager&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;SecurityProtocol&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-bor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3072&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;iex&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;New-Object&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;System.Net.WebClient&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;DownloadString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'https://community.chocolatey.org/install.ps1'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Install Terraform&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;choco&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;terraform&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Verify installation&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;terraform&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configuring AWS CLI for Terraform
&lt;/h2&gt;

&lt;p&gt;Since Terraform works seamlessly with AWS, setting up the AWS CLI is essential for managing AWS resources:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Install AWS CLI
&lt;/h3&gt;

&lt;h4&gt;
  
  
  For Linux
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Download the installation file&lt;/span&gt;
curl &lt;span class="s2"&gt;"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s2"&gt;"awscliv2.zip"&lt;/span&gt;

&lt;span class="c"&gt;# Unzip the installer&lt;/span&gt;
unzip awscliv2.zip

&lt;span class="c"&gt;# Run the install program&lt;/span&gt;
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./aws/install

&lt;span class="c"&gt;# Verify installation&lt;/span&gt;
aws &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  For macOS
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Using Homebrew&lt;/span&gt;
brew &lt;span class="nb"&gt;install &lt;/span&gt;awscli

&lt;span class="c"&gt;# Verify installation&lt;/span&gt;
aws &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  For Windows
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Using Chocolatey&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;choco&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;awscli&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Verify installation&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;aws&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Configure AWS CLI
&lt;/h3&gt;

&lt;p&gt;After installation, you need to configure AWS CLI with your credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll be prompted to enter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Access Key ID&lt;/li&gt;
&lt;li&gt;AWS Secret Access Key&lt;/li&gt;
&lt;li&gt;Default region name (e.g., us-west-2)&lt;/li&gt;
&lt;li&gt;Default output format (json is recommended)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These credentials will be stored in &lt;code&gt;~/.aws/credentials&lt;/code&gt; and &lt;code&gt;~/.aws/config&lt;/code&gt; files, which Terraform will automatically use when interacting with AWS.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Best Practices for AWS Credentials
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Never hardcode AWS credentials in your Terraform files&lt;/li&gt;
&lt;li&gt;Use IAM roles for EC2 instances when possible&lt;/li&gt;
&lt;li&gt;Consider using AWS Vault or similar tools for enhanced security&lt;/li&gt;
&lt;li&gt;Regularly rotate your access keys&lt;/li&gt;
&lt;li&gt;Use the principle of least privilege when creating IAM policies&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started with Terraform and AWS
&lt;/h2&gt;

&lt;p&gt;Once you have Terraform and AWS CLI set up, you can create your first Terraform configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="c1"&gt;# main.tf&lt;/span&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-west-2"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&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;"example"&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="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
  &lt;span class="nx"&gt;instance_type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;

  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&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;"terraform-example"&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;To deploy this infrastructure:&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="c"&gt;# Initialize Terraform&lt;/span&gt;
terraform init

&lt;span class="c"&gt;# Preview changes&lt;/span&gt;
terraform plan

&lt;span class="c"&gt;# Apply changes&lt;/span&gt;
terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Infrastructure as Code represents a paradigm shift in how we manage and provision infrastructure. By treating infrastructure configuration as software code, organizations can achieve greater consistency, efficiency, and reliability in their deployments.&lt;/p&gt;

&lt;p&gt;Terraform, with its declarative syntax and multi-cloud support, has become a go-to tool for implementing IaC. Combined with proper AWS configuration, it provides a powerful foundation for modern infrastructure management.&lt;/p&gt;

&lt;p&gt;As you embark on your IaC journey, remember that the true value lies not just in the automation itself, but in the cultural and process changes that accompany it. Embrace version control, code reviews, and continuous integration for your infrastructure code, just as you would for application code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Terraform Official Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developer.hashicorp.com/terraform/docs" rel="noopener noreferrer"&gt;https://developer.hashicorp.com/terraform/docs&lt;/a&gt;&lt;br&gt;
The official Terraform documentation, including guides, language references, and tutorials.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs" rel="noopener noreferrer"&gt;https://registry.terraform.io/providers/hashicorp/aws/latest/docs&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Learning and Tutorials
&lt;/h3&gt;

&lt;p&gt;HashiCorp Learn - &lt;a href="https://developer.hashicorp.com/terraform/tutorials" rel="noopener noreferrer"&gt;https://developer.hashicorp.com/terraform/tutorials&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
