<?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: Irlan Dos Santos</title>
    <description>The latest articles on DEV Community by Irlan Dos Santos (@irlan_dossantos_9c6c1c92).</description>
    <link>https://dev.to/irlan_dossantos_9c6c1c92</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%2F2558685%2F0b7550f3-5a62-45e0-8314-70a8f531ae0c.png</url>
      <title>DEV Community: Irlan Dos Santos</title>
      <link>https://dev.to/irlan_dossantos_9c6c1c92</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/irlan_dossantos_9c6c1c92"/>
    <language>en</language>
    <item>
      <title>Visualize Data with AWS QuickSight</title>
      <dc:creator>Irlan Dos Santos</dc:creator>
      <pubDate>Thu, 19 Dec 2024 17:28:30 +0000</pubDate>
      <link>https://dev.to/irlan_dossantos_9c6c1c92/visualize-data-with-aws-quicksight-2jfk</link>
      <guid>https://dev.to/irlan_dossantos_9c6c1c92/visualize-data-with-aws-quicksight-2jfk</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Amazon QuickSight empowers users to analyze datasets and create insightful visualizations with ease. This guide walks you through the process of analyzing Netflix's extensive dataset of shows and movies to create a dynamic dashboard brimming with actionable insights.&lt;/p&gt;




&lt;h2&gt;
  
  
  Project Objectives
&lt;/h2&gt;

&lt;p&gt;Here’s the roadmap to transform raw data into a polished dashboard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Upload the Dataset:&lt;/strong&gt; Store data in an Amazon S3 bucket.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a QuickSight Account:&lt;/strong&gt; Set up and access Amazon QuickSight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connect Data:&lt;/strong&gt; Link the S3-hosted dataset with QuickSight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visualize Data:&lt;/strong&gt; Build graphs, charts, and perform analyses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish Dashboard:&lt;/strong&gt; Share your findings via a professionally styled dashboard.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Instructions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Dataset Preparation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Download Required Files:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://raw.githubusercontent.com/Gigantessaba/irlan_aws_projects/refs/heads/main/project2/netflix_titles.csv" rel="noopener noreferrer"&gt;netflix_titles.csv&lt;/a&gt;: Contains information about Netflix's titles.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://raw.githubusercontent.com/Gigantessaba/irlan_aws_projects/refs/heads/main/project2/manifest.json" rel="noopener noreferrer"&gt;manifest.json&lt;/a&gt;: A configuration file to guide QuickSight in reading the dataset.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  Store Dataset in Amazon S3
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Log in to your AWS Management Console.&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;S3 service&lt;/strong&gt; and create a new bucket:

&lt;ul&gt;
&lt;li&gt;Name the bucket (e.g., &lt;code&gt;quicksight-project-dataset&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Choose a region near you for optimal performance.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Upload &lt;code&gt;netflix_titles.csv&lt;/code&gt;.&lt;/li&gt;

&lt;li&gt;Copy the S3 URL of the uploaded dataset for later use.&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%2Fgma0tsi38j8bqrj4btao.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%2Fgma0tsi38j8bqrj4btao.png" alt="Image description" width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the &lt;code&gt;manifest.json&lt;/code&gt; file and replace the placeholder URL with the Amazon S3 URL of your dataset.&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%2Fasddltqh8zu42vuyv9wf.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%2Fasddltqh8zu42vuyv9wf.png" alt="Image description" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Set Up Amazon QuickSight
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Search for &lt;strong&gt;Amazon QuickSight&lt;/strong&gt; in your AWS console.&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%2Ftp711j4va03u58z65igp.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%2Ftp711j4va03u58z65igp.png" alt="Image description" width="800" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign up for the &lt;strong&gt;Enterprise Free Trial&lt;/strong&gt; (ensure optional features like paginated reports are unchecked to avoid charges).&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%2Ftwt1utka8wqeewco30xm.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%2Ftwt1utka8wqeewco30xm.png" alt="Image description" width="800" height="645"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter your details for your QuickSight account. Make sure the email you use matches your AWS account email to avoid errors.&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%2Fzvn8kd3z7mmsdvyagm02.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%2Fzvn8kd3z7mmsdvyagm02.png" alt="Image description" width="800" height="786"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select &lt;strong&gt;Select S3 buckets&lt;/strong&gt; and look for the bucket you created earlier.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make sure you &lt;strong&gt;UNCHECK ANY OPTIONAL ADD-ON options.&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%2F6u0cr0wdzccakswaucx3.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%2F6u0cr0wdzccakswaucx3.png" alt="Image description" width="800" height="291"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Stop and double-check:&lt;br&gt;
Did you uncheck "ANY OPTIONAL ADD-ON options" checkbox? Make sure to do this so your AWS account doesn't get charged!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Finish.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Connect S3 Bucket to QuickSight
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Datasets&lt;/strong&gt; section in QuickSight and select &lt;strong&gt;New Dataset.&lt;/strong&gt;
&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%2Fep4mv9iyvykvvbu21de5.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%2Fep4mv9iyvykvvbu21de5.png" alt="Image description" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose &lt;strong&gt;S3&lt;/strong&gt; as the data source and enter a name (e.g., &lt;code&gt;Netflix_Data&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Copy the S3 URL of &lt;code&gt;manifest.json&lt;/code&gt;, paste it into the required field, and connect.&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%2Fenh5849frkwgauvaac06.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%2Fenh5849frkwgauvaac06.png" alt="Image description" width="632" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You will see this screen; click &lt;strong&gt;Visualize.&lt;/strong&gt;
&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%2F6vrdoragc2sy9pug3x2s.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%2F6vrdoragc2sy9pug3x2s.png" alt="Image description" width="638" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On this screen, click &lt;strong&gt;X.&lt;/strong&gt;
&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%2Fjuliha3fy3a3fwwn1k9g.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%2Fjuliha3fy3a3fwwn1k9g.png" alt="Image description" width="800" height="613"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Any Errors?
&lt;/h2&gt;

&lt;p&gt;No stress! Errors can happen, especially when you're connecting your dataset with QuickSight. Here are the top errors and solutions:&lt;/p&gt;

&lt;h3&gt;
  
  
  Common Errors and Fixes
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;QuickSight doesn't have permissions to access the database&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cause:&lt;/strong&gt; QuickSight might not be connected to your S3 bucket.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution:&lt;/strong&gt; 

&lt;ol&gt;
&lt;li&gt;Select the profile icon on the top-right of the QuickSight dashboard.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Manage QuickSight&lt;/strong&gt; and then &lt;strong&gt;Security &amp;amp; permissions.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;QuickSight access to AWS services&lt;/strong&gt;, select &lt;strong&gt;Manage&lt;/strong&gt; and add your S3 bucket.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Manifest file cannot be parsed as valid JSON&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cause:&lt;/strong&gt; The &lt;code&gt;manifest.json&lt;/code&gt; file is incorrectly formatted or doesn't match the S3 region.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;Ensure your QuickSight account is in the same region as your S3 bucket.&lt;/li&gt;
&lt;li&gt;Check your S3 bucket's region in the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Compare it with the region displayed in your QuickSight dashboard (profile icon &amp;gt; region details).&lt;/li&gt;
&lt;li&gt;Verify that &lt;code&gt;manifest.json&lt;/code&gt; is formatted correctly:&lt;/li&gt;
&lt;li&gt;Ensure no brackets are missing.&lt;/li&gt;
&lt;li&gt;Confirm the S3 bucket URI in the file is accurate.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Unable to connect to the S3 bucket&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cause:&lt;/strong&gt; The S3 bucket may not be associated with your AWS account, or your QuickSight email may not match.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Ensure your QuickSight email matches your AWS account email.&lt;/li&gt;
&lt;li&gt;If they differ, delete your QuickSight account and recreate it using the same email as your AWS account.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Not enough SPICE capacity&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cause:&lt;/strong&gt; SPICE (QuickSight's in-memory engine) capacity is region-specific.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Use the same region where you created your QuickSight account.&lt;/li&gt;
&lt;li&gt;Free SPICE capacity is only available in the region where QuickSight was initially set up.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ol&gt;




&lt;h3&gt;
  
  
  Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Double-check JSON formatting before uploading.&lt;/li&gt;
&lt;li&gt;Always ensure QuickSight and S3 regions match.&lt;/li&gt;
&lt;li&gt;Regularly verify permissions for AWS services in &lt;strong&gt;Manage QuickSight.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By addressing these common issues, you'll be well-prepared to connect your dataset successfully!&lt;/p&gt;




&lt;h3&gt;
  
  
  Create Your Visualizations
&lt;/h3&gt;

&lt;p&gt;Some Explanation about the Fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data:&lt;/strong&gt; The head of a column, where information is cataloged.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visuals:&lt;/strong&gt; The type of graphs you can choose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add Data, Y-Axis Value, Group/Color:&lt;/strong&gt; Attributes you can edit to adjust how data appears in graphs.&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%2Fwcug3u3kd3jeezefimgs.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%2Fwcug3u3kd3jeezefimgs.png" alt="Image description" width="800" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explore the dataset and view available fields.
-Just play combining the DATA groups, and change the type of graphs:&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%2Femdu3t3rehgw7ub8w9nv.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%2Femdu3t3rehgw7ub8w9nv.png" alt="Image description" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on &lt;code&gt;release_year&lt;/code&gt; to the Y-axis to visualize title releases over time.&lt;/li&gt;
&lt;li&gt;Experiment with chart types like bar charts, pie charts, and donut charts.&lt;/li&gt;
&lt;li&gt;Group data by categories like &lt;code&gt;type&lt;/code&gt; (TV shows vs. movies) for deeper insights.&lt;/li&gt;
&lt;li&gt;Resize and rearrange charts for clarity and aesthetics.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Advanced Analysis
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create a horizontal 100% stacked bar chart to show proportions of TV shows vs. movies by release year.&lt;/li&gt;
&lt;li&gt;Present the number of titles per year in a detailed table.&lt;/li&gt;
&lt;li&gt;Identify the date with the highest number of new titles (e.g., January 1, 2020).&lt;/li&gt;
&lt;li&gt;Filter for categories like &lt;code&gt;Action &amp;amp; Adventure&lt;/code&gt;, &lt;code&gt;TV Comedies&lt;/code&gt;, and &lt;code&gt;Thrillers&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Filter to show titles released in or after 2015 for selected genres.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Polishing Your Dashboard
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add clear and descriptive titles to all charts:

&lt;ul&gt;
&lt;li&gt;"Titles by Release Year"&lt;/li&gt;
&lt;li&gt;"Proportion of Movies vs. TV Shows"&lt;/li&gt;
&lt;li&gt;"Genre Distribution Over Time"&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Publish the dashboard and export it as a PDF for sharing.&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  Wrap-Up
&lt;/h2&gt;

&lt;p&gt;Congratulations! You’ve created a comprehensive QuickSight dashboard. Here’s a summary of what you achieved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uploaded data to Amazon S3.&lt;/li&gt;
&lt;li&gt;Connected S3 to QuickSight.&lt;/li&gt;
&lt;li&gt;Built visualizations that uncover meaningful trends.&lt;/li&gt;
&lt;li&gt;Published and exported a polished dashboard.&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%2Fw4rq3844ogahe9o0j9db.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%2Fw4rq3844ogahe9o0j9db.png" alt="Image description" width="450" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don’t forget to clean up your AWS resources to avoid unnecessary charges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Delete your QuickSight account.
-On the dashboard, go to top right corner, click on the user icon, and then Manage QuickSight.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Select Account Settings from the left hand navigation panel, and then Manage at the bottom of the 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%2Funzg0d0nyx82m89mmskl.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%2Funzg0d0nyx82m89mmskl.png" alt="Image description" width="800" height="535"&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%2Fikmvf2w00ddfmop94b24.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%2Fikmvf2w00ddfmop94b24.png" alt="Image description" width="618" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Empty and delete your S3 bucket.
-If you prefer, you can use the cloudshell and run the command: &lt;/li&gt;
&lt;/ul&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
aws s3 rb s3://YourBucketName --force

Good Job!!!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Host a Website on Amazon S3</title>
      <dc:creator>Irlan Dos Santos</dc:creator>
      <pubDate>Thu, 19 Dec 2024 15:28:57 +0000</pubDate>
      <link>https://dev.to/irlan_dossantos_9c6c1c92/how-i-used-amazon-s3-in-this-projectto-host-a-static-website-5a83</link>
      <guid>https://dev.to/irlan_dossantos_9c6c1c92/how-i-used-amazon-s3-in-this-projectto-host-a-static-website-5a83</guid>
      <description>&lt;h2&gt;
  
  
  Host a Website on Amazon S3
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Irlan Dos Santos&lt;/em&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%2Fd8272nf2qgzizxr2cfwo.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%2Fd8272nf2qgzizxr2cfwo.png" alt="An inspiring banner showcasing the theme of hosting a website" width="800" height="719"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Introducing Today's Project!
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is Amazon S3?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Amazon S3 (Simple Storage Service) is a highly scalable and durable cloud storage solution offered by AWS. While its primary purpose is to store objects (files) and their metadata, it also includes features like static website hosting, making it a versatile tool for developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does Amazon S3 work for hosting?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Static website hosting with Amazon S3 is perfect for websites that don’t require server-side scripting (e.g., PHP). S3 buckets serve as containers for your website’s files, delivering content over the internet with low latency and high availability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One thing I didn't expect in this project was:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Since I was already familiar with the steps, there were no surprises during the process. This project helped solidify my knowledge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This project took me:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Approximately &lt;strong&gt;20 minutes&lt;/strong&gt; from start to finish, thanks to the user-friendly AWS interface.&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Set Up an S3 Bucket
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Steps to Create the S3 Bucket:&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Duration:&lt;/strong&gt; The bucket creation process was quick and straightforward, taking only 1 minute.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Region Selection:&lt;/strong&gt; I selected &lt;code&gt;us-east-1&lt;/code&gt; (Northern Virginia) for its reliability, proximity, and lower cost.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Naming:&lt;/strong&gt; S3 bucket names must be globally unique. For this project, I used a descriptive name: &lt;code&gt;nextwork-website-project-irlan&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Why is the S3 bucket important?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The bucket serves as the root directory for your website files. It ensures proper organization, access control, and efficient content delivery.&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%2F9hpbbt76miom044nhqgc.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%2F9hpbbt76miom044nhqgc.png" alt="Screenshot of the S3 bucket setup interface" width="800" height="204"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Upload Website Files to S3
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What Files Were Uploaded?&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;index.html&lt;/code&gt;: The main HTML file that structures and displays the website’s content.
&lt;/li&gt;
&lt;li&gt;Image assets: A &lt;code&gt;.zip&lt;/code&gt; file containing all visual elements, such as logos, banners, and images, to enhance the website’s look and feel.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Why are these files critical?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The &lt;code&gt;index.html&lt;/code&gt; file acts as the website's entry point, ensuring users land on a functioning homepage. Meanwhile, images improve user experience and engagement by adding visual appeal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How were the files uploaded?&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigated to the &lt;strong&gt;Objects&lt;/strong&gt; tab in the S3 bucket dashboard.
&lt;/li&gt;
&lt;li&gt;Used the &lt;strong&gt;Upload&lt;/strong&gt; button to add the required files.
&lt;/li&gt;
&lt;li&gt;Ensured files were set to the &lt;strong&gt;Standard Storage Class&lt;/strong&gt;, which balances cost and performance for static websites.&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%2Fy71b6cpx444pgky8z1f7.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%2Fy71b6cpx444pgky8z1f7.png" alt="Screenshot showing uploaded website files in S3" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Static Website Hosting on S3
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Website hosting refers to the process of making your website accessible to users on the internet. Amazon S3 simplifies this by enabling static website hosting directly from an S3 bucket.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to Enable Static Website Hosting:&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the bucket’s &lt;strong&gt;Properties&lt;/strong&gt; tab.
&lt;/li&gt;
&lt;li&gt;Scroll to the &lt;strong&gt;Static Website Hosting&lt;/strong&gt; section and click "Edit."
&lt;/li&gt;
&lt;li&gt;Select "Enable" to activate hosting.
&lt;/li&gt;
&lt;li&gt;Specify &lt;code&gt;index.html&lt;/code&gt; as the &lt;strong&gt;Index Document&lt;/strong&gt; (the homepage users see).
&lt;/li&gt;
&lt;li&gt;Optionally, add &lt;code&gt;error.html&lt;/code&gt; for handling 404 errors.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Why are permissions (ACL) important?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Access Control Lists (ACLs) dictate who can access the files in the bucket. Public access must be explicitly enabled for website hosting to function properly.&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%2Fd474irxd5ikuizk1r2vb.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%2Fd474irxd5ikuizk1r2vb.png" alt="Screenshot of the static website hosting setup" width="702" height="684"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Bucket Endpoints
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is a Bucket Endpoint?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Once hosting is enabled, Amazon S3 generates a unique URL for your website. This endpoint allows users to access your website via their browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Endpoint URL:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;http://nextwork-website-project-irlan.s3-website-us-east-1.amazonaws.com/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initial Error Encountered:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When I first visited the bucket endpoint, I encountered a &lt;strong&gt;403 Forbidden - Access Denied&lt;/strong&gt; error. This occurred because the files were not publicly accessible, which is a common oversight during initial setup.&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%2Fw4eetmmhvpvb0pwfm7xq.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%2Fw4eetmmhvpvb0pwfm7xq.png" alt="Screenshot showing the Access Denied error" width="800" height="204"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Success!
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How I Resolved the Access Error:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
To make the files accessible:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigated to the &lt;strong&gt;Objects&lt;/strong&gt; tab in the bucket.
&lt;/li&gt;
&lt;li&gt;Selected all files and clicked &lt;strong&gt;Actions &amp;gt; Make Public (using ACL)&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Confirmed the changes.
&lt;/li&gt;
&lt;li&gt;Refreshed the browser, and the website was successfully displayed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The website is now live and accessible at the endpoint URL, showcasing a functional static website hosted on Amazon S3.&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%2Fr1u8s6wo1ll1z8mktgad.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%2Fr1u8s6wo1ll1z8mktgad.png" alt="Screenshot of the successful website hosting result" width="800" height="719"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Terraformer to Import and Manage VMware Infrastructure with Terraform and AWS Backup Strategy</title>
      <dc:creator>Irlan Dos Santos</dc:creator>
      <pubDate>Thu, 19 Dec 2024 13:46:52 +0000</pubDate>
      <link>https://dev.to/irlan_dossantos_9c6c1c92/using-terraformer-to-import-and-manage-vmware-infrastructure-with-terraform-and-aws-backup-strategy-58c4</link>
      <guid>https://dev.to/irlan_dossantos_9c6c1c92/using-terraformer-to-import-and-manage-vmware-infrastructure-with-terraform-and-aws-backup-strategy-58c4</guid>
      <description>&lt;p&gt;Organizations with hybrid cloud infrastructures often face challenges in managing on-premises resources and integrating them with cloud solutions for backup and recovery. This article outlines a strategy to use Terraformer for importing VMware infrastructure, manage it with the Terraform vSphere provider, and integrate AWS as a reliable backup and restore solution. This approach ensures efficient infrastructure management and disaster recovery capabilities.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Hybrid Infrastructure Overview&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;On-Premises Infrastructure&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The local network infrastructure described consists of a dedicated VMware ESXi host with six virtual machines (VMs) configured to provide essential network and IT services for the company. Key components include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Active Directory (AD) Server&lt;/strong&gt;: Domain controller managing user authentication, DHCP, and DNS services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backup Server&lt;/strong&gt;: Utilizing Veeam Backup &amp;amp; Replication for local and cloud-based backups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File Server&lt;/strong&gt;: Centralized storage for shared files and documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal Server (TS)&lt;/strong&gt;: Hosts the ERP system for remote access by users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firebird Database Server&lt;/strong&gt;: Supports the ERP system and accounting applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PFsense Firewall&lt;/strong&gt;: Provides network security and VPN capabilities for remote access.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cloud Integration via AWS&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;AWS serves as the cloud-based backup solution for redundancy and disaster recovery. The strategy involves storing Veeam backups in Amazon S3 and utilizing AWS Glacier for long-term archival.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Step 1: Use Terraformer to Import VMware Resources&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1.1 Install and Configure Terraformer&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Download Terraformer&lt;/strong&gt;: Install Terraformer from its &lt;a href="https://github.com/GoogleCloudPlatform/terraformer/releases" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set Environment Variables&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;VSPHERE_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"administrator@vsphere.local"&lt;/span&gt;
   &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;VSPHERE_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_password"&lt;/span&gt;
   &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;VSPHERE_SERVER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"vcenter.example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;1.2 Run Terraformer Import&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Run the following command to import existing VMware resources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraformer import vsphere &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vm,datastore,network &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--connect&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vcenter.example.com &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;administrator@vsphere.local &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_password &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--path-output&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"./output"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--resources&lt;/code&gt;&lt;/strong&gt;: Specifies the resources to import (e.g., VMs, datastores, networks).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--path-output&lt;/code&gt;&lt;/strong&gt;: Directory to store generated Terraform configuration files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1.3 Review Generated Files&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Terraformer generates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;.tf Files&lt;/strong&gt;: Represent the imported VMware infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terraform State File&lt;/strong&gt;: Tracks the current state of imported resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Organize and modularize the configuration files as needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2: Manage VMware Resources with Terraform vSphere Provider&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2.1 Configure the vSphere Provider&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Set up the Terraform vSphere provider in a &lt;code&gt;provider.tf&lt;/code&gt; 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="nx"&gt;provider&lt;/span&gt; &lt;span class="s2"&gt;"vsphere"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;user&lt;/span&gt;           &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"administrator@vsphere.local"&lt;/span&gt;
  &lt;span class="nx"&gt;password&lt;/span&gt;       &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"your_password"&lt;/span&gt;
  &lt;span class="nx"&gt;server&lt;/span&gt;         &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"vcenter.example.com"&lt;/span&gt;
  &lt;span class="nx"&gt;allow_unverified_ssl&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;2.2 Refine Imported Resources&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Move the imported &lt;code&gt;.tf&lt;/code&gt; files to your Terraform project directory and refine the configuration. For example, to manage a virtual machine:&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="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"vsphere_virtual_machine"&lt;/span&gt; &lt;span class="s2"&gt;"ad_server"&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;"AD-Server"&lt;/span&gt;
  &lt;span class="nx"&gt;resource_pool_id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"resgroup-123"&lt;/span&gt;
  &lt;span class="nx"&gt;datastore_id&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"datastore-456"&lt;/span&gt;

  &lt;span class="nx"&gt;num_cpus&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
  &lt;span class="nx"&gt;memory&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;4096&lt;/span&gt;
  &lt;span class="nx"&gt;guest_id&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"windows9_64Guest"&lt;/span&gt;

  &lt;span class="nx"&gt;network_interface&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;network_id&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"network-789"&lt;/span&gt;
    &lt;span class="nx"&gt;adapter_type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"vmxnet3"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;disk&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;label&lt;/span&gt;            &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"disk0"&lt;/span&gt;
    &lt;span class="nx"&gt;size&lt;/span&gt;             &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;
    &lt;span class="nx"&gt;eagerly_scrub&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="nx"&gt;thin_provisioned&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&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;
  
  
  &lt;strong&gt;2.3 Apply Changes&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Run Terraform commands to apply the refined configuration:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;






&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3: Backup and Restore Strategy with AWS&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.1 Configure Veeam for AWS S3&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create an S3 Bucket&lt;/strong&gt;:
Use Terraform to create a bucket for storing backups:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;   &lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket"&lt;/span&gt; &lt;span class="s2"&gt;"veeam_backup"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;bucket&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"veeam-backup-bucket"&lt;/span&gt;
  &lt;span class="nx"&gt;acl&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"private"&lt;/span&gt;

  &lt;span class="c1"&gt;# Define lifecycle rules for Intelligent-Tiering&lt;/span&gt;
  &lt;span class="nx"&gt;lifecycle_rule&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="s2"&gt;"intelligent-tiering"&lt;/span&gt;
    &lt;span class="nx"&gt;enabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

    &lt;span class="c1"&gt;# Transition to Intelligent-Tiering frequent access tier after creation (automatic)&lt;/span&gt;
    &lt;span class="nx"&gt;transition&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;days&lt;/span&gt;          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
      &lt;span class="nx"&gt;storage_class&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"INTELLIGENT_TIERING"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;# Transition to Intelligent-Tiering infrequent access tier after 30 days&lt;/span&gt;
    &lt;span class="nx"&gt;transition&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;days&lt;/span&gt;          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;
      &lt;span class="nx"&gt;storage_class&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"STANDARD_IA"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;# Transition to Intelligent-Tiering archive access after 90 days&lt;/span&gt;
    &lt;span class="nx"&gt;transition&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;days&lt;/span&gt;          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;
      &lt;span class="nx"&gt;storage_class&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"GLACIER"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;# Transition to deep archive access tier after 120 days&lt;/span&gt;
    &lt;span class="nx"&gt;transition&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;days&lt;/span&gt;          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;
      &lt;span class="nx"&gt;storage_class&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"DEEP_ARCHIVE"&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="c1"&gt;# Enable server-side encryption&lt;/span&gt;
  &lt;span class="nx"&gt;server_side_encryption_configuration&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;rule&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;apply_server_side_encryption_by_default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;sse_algorithm&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"AES256"&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="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Integrate with Veeam&lt;/strong&gt;:
Configure Veeam Backup &amp;amp; Replication to use the S3 bucket for offsite backups.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.2 Regular Backup and Testing&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Schedule daily backups to S3 with periodic testing of restore capabilities.&lt;/li&gt;
&lt;li&gt;Implement incremental backups to optimize storage and bandwidth.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.3 Monitor and Optimize&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use Amazon CloudWatch to monitor S3 bucket activity.&lt;/li&gt;
&lt;li&gt;Optimize costs by reviewing storage lifecycle policies and access patterns.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;By combining Terraformer, the Terraform vSphere provider, and AWS backup strategies, you can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Simplify Management&lt;/strong&gt;: Import and manage VMware resources declaratively.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhance Resilience&lt;/strong&gt;: Leverage AWS for reliable offsite backups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamline Operations&lt;/strong&gt;: Automate infrastructure tasks for consistent and scalable management.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This hybrid approach ensures that your on-premises infrastructure is both robust and prepared for disaster recovery scenarios, delivering long-term operational efficiency.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>aws</category>
      <category>vmware</category>
    </item>
    <item>
      <title>How to Deploy Resources on AWS Using Terraform</title>
      <dc:creator>Irlan Dos Santos</dc:creator>
      <pubDate>Tue, 17 Dec 2024 20:32:39 +0000</pubDate>
      <link>https://dev.to/irlan_dossantos_9c6c1c92/how-to-deploy-resources-on-aws-using-terraform-3c2p</link>
      <guid>https://dev.to/irlan_dossantos_9c6c1c92/how-to-deploy-resources-on-aws-using-terraform-3c2p</guid>
      <description>&lt;h2&gt;
  
  
  How to Deploy AWS Resources Using Terraform
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before starting, ensure the following tools are installed and configured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Terraform&lt;/strong&gt; - &lt;a href="https://developer.hashicorp.com/terraform/downloads" rel="noopener noreferrer"&gt;Install Terraform&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS CLI&lt;/strong&gt; with configured Access KeyID and secret AccessKey.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create a folder, exemple:my_test_deploy, open VS Code and open the folder you just created.&lt;br&gt;
Create a new file and name it as main.tf, and paste the terraform code bellow.&lt;/p&gt;


&lt;h3&gt;
  
  
  2. Backend State Storage (Optional)
&lt;/h3&gt;

&lt;p&gt;In a production environment, save your state file remotely. To enable S3 remote state storage, update the following block:&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="nx"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;backend&lt;/span&gt; &lt;span class="s2"&gt;"s3"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;bucket&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"your-s3-bucket-name"&lt;/span&gt;
    &lt;span class="nx"&gt;key&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"terraform/state.tfstate"&lt;/span&gt;
    &lt;span class="nx"&gt;region&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt;
    &lt;span class="nx"&gt;encrypt&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&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;
  
  
  3. Terraform Configuration
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Required Providers and Versions
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;required_providers&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;aws&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;source&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"hashicorp/aws"&lt;/span&gt;
      &lt;span class="nx"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"~&amp;gt; 4.16"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;required_version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&amp;gt;= 1.2.0"&lt;/span&gt;
&lt;span class="p"&gt;}&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-east-1"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Create VPC
&lt;/h4&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;"my_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="s2"&gt;"10.0.0.0/16"&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="s2"&gt;"my_vpc"&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;h4&gt;
  
  
  Create Public Subnet
&lt;/h4&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_subnet"&lt;/span&gt; &lt;span class="s2"&gt;"public_subnet"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;vpc_id&lt;/span&gt;                  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_vpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;my_vpc&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;cidr_block&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"10.0.1.0/24"&lt;/span&gt;
  &lt;span class="nx"&gt;availability_zone&lt;/span&gt;       &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1a"&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;"public-subnet"&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;h4&gt;
  
  
  Create Private Subnet
&lt;/h4&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_subnet"&lt;/span&gt; &lt;span class="s2"&gt;"private_subnet"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;vpc_id&lt;/span&gt;                  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_vpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;my_vpc&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;cidr_block&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"10.0.2.0/24"&lt;/span&gt;
  &lt;span class="nx"&gt;availability_zone&lt;/span&gt;       &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1b"&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;"private-subnet"&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;h4&gt;
  
  
  Create Internet Gateway
&lt;/h4&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_internet_gateway"&lt;/span&gt; &lt;span class="s2"&gt;"igw"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;vpc_id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_vpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;my_vpc&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;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;"my-igw"&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;h4&gt;
  
  
  Create Route Table for Public Subnet
&lt;/h4&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_route_table"&lt;/span&gt; &lt;span class="s2"&gt;"public_rt"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;vpc_id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_vpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;my_vpc&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;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;"public-route-table"&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;h4&gt;
  
  
  Add Route to Internet Gateway
&lt;/h4&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_route"&lt;/span&gt; &lt;span class="s2"&gt;"public_internet_route"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;route_table_id&lt;/span&gt;         &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_route_table&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;public_rt&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;destination_cidr_block&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"0.0.0.0/0"&lt;/span&gt;
  &lt;span class="nx"&gt;gateway_id&lt;/span&gt;             &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_internet_gateway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;igw&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Associate Public Subnet with Route Table
&lt;/h4&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_route_table_association"&lt;/span&gt; &lt;span class="s2"&gt;"public_assoc"&lt;/span&gt; &lt;span class="p"&gt;{&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;route_table_id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_route_table&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;public_rt&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Launch an EC2 Instance
&lt;/h4&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;"app_server_irlan"&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-01816d07b1128cd2d"&lt;/span&gt;   &lt;span class="c1"&gt;# Replace with the desired AMI 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="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;"app_server_irlan"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4. Outputs
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Output VPC ID
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="s2"&gt;"vpc_id"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_vpc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;my_vpc&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Output Public Subnet ID
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="s2"&gt;"public_subnet_id"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;value&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Output EC2 Instance Public IP
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="s2"&gt;"instance_public_ip"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;app_server_irlan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;public_ip&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Terraform Workflow
&lt;/h2&gt;

&lt;p&gt;Open a terminal, and go to the folder you created earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Initialize Terraform
&lt;/h3&gt;

&lt;p&gt;Run the following command to initialize the working directory and download the AWS provider plugin:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 2: Review the Terraform Plan
&lt;/h3&gt;

&lt;p&gt;Verify the resources that will be created:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 3: Deploy the Resources
&lt;/h3&gt;

&lt;p&gt;Apply the Terraform script to provision resources on AWS:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Type &lt;code&gt;yes&lt;/code&gt; when prompted to confirm the deployment.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Verify the Deployment
&lt;/h3&gt;

&lt;p&gt;After applying the script:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check the &lt;strong&gt;AWS Management Console&lt;/strong&gt; for the created VPC, subnets, and EC2 instance.&lt;/li&gt;
&lt;li&gt;Use the outputs printed to access the &lt;strong&gt;public subnet ID&lt;/strong&gt;, &lt;strong&gt;EC2 instance public IP&lt;/strong&gt;, and &lt;strong&gt;VPC ID&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To get outputs again at any time, run:
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;/div&gt;






&lt;h3&gt;
  
  
  6. Clean Up
&lt;/h3&gt;

&lt;p&gt;To destroy all resources created by Terraform:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Confirm by typing &lt;code&gt;yes&lt;/code&gt; when prompted.&lt;/p&gt;




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

&lt;p&gt;Using Terraform to deploy infrastructure on AWS provides a scalable and consistent approach. This script automates the creation of a VPC, public and private subnets, an Internet Gateway, and an EC2 instance. You can modify or extend it further to include security groups, load balancers, or RDS instances as needed.&lt;/p&gt;

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