<?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: Venkatesh K</title>
    <description>The latest articles on DEV Community by Venkatesh K (@venkatesh111).</description>
    <link>https://dev.to/venkatesh111</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F876090%2Fe5631f88-585b-445b-8a42-66d8d2824ec9.png</url>
      <title>DEV Community: Venkatesh K</title>
      <link>https://dev.to/venkatesh111</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/venkatesh111"/>
    <language>en</language>
    <item>
      <title>Terraform Terminologies Explained for Beginners with AWS Examples</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Tue, 17 Nov 2026 09:28:27 +0000</pubDate>
      <link>https://dev.to/aws-builders/terraform-terminologies-explained-for-beginners-with-aws-examples-g69</link>
      <guid>https://dev.to/aws-builders/terraform-terminologies-explained-for-beginners-with-aws-examples-g69</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When you start learning Terraform, the commands are not the hard part, the terms are. Provider, resource, data source, argument, attribute, meta-argument, state, backend. Everything sounds similar, and it is easy to end up copy pasting code without really knowing what each part is doing.&lt;/p&gt;

&lt;p&gt;In this article, I have explained the most important Terraform terminologies in simple words, with small AWS examples for each one. We will start from blocks and labels, and then go through providers, resources, variables, outputs, modules, state and a few more terms. By the end, you should be able to read a Terraform file and understand what is going on in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terraform Blocks and Labels
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Blocks:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Terraform configuration is written using &lt;strong&gt;blocks&lt;/strong&gt;. A block is a container that holds the configuration for something, like a provider, a resource or a variable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Block Syntax&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;block_type&lt;/span&gt; &lt;span class="s2"&gt;"label1"&lt;/span&gt; &lt;span class="s2"&gt;"label2"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;argument1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"value1"&lt;/span&gt;
    &lt;span class="n"&gt;argument2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"value2"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Here, a block has three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Block type:&lt;/strong&gt; &lt;code&gt;resource&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Labels:&lt;/strong&gt; &lt;code&gt;"aws_instance"&lt;/code&gt; and &lt;code&gt;"example"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Body:&lt;/strong&gt; everything inside the curly braces &lt;code&gt;{ }&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Labels&lt;/strong&gt; are the names that come after the block type. The number of labels depends on the block type.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Block type&lt;/th&gt;
&lt;th&gt;Number of labels&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;terraform&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;&lt;code&gt;terraform { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;locals&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;&lt;code&gt;locals { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;provider&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;provider "aws" { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;variable&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;variable "aws_region" { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;output&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;output "instance_id" { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;module&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;module "vpc" { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;resource&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;resource "aws_instance" "example" { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;data&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;data "aws_ami" "latest" { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Nested blocks:&lt;/strong&gt; A block can also have another block inside it. For example, &lt;strong&gt;filter&lt;/strong&gt; inside a data source, &lt;strong&gt;lifecycle&lt;/strong&gt; inside a resource, or &lt;strong&gt;ingress&lt;/strong&gt; inside a security group.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_security_group"&lt;/span&gt; &lt;span class="s2"&gt;"web"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"web-sg"&lt;/span&gt;

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

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Block vs Argument:&lt;/strong&gt; An argument is a single &lt;code&gt;name = value&lt;/code&gt; line. A block has curly braces and can contain arguments and other blocks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;#&lt;/code&gt; a single line comment &lt;/li&gt;
&lt;li&gt;use &lt;code&gt;/* ... */&lt;/code&gt; for multiple lines.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;//&lt;/code&gt; also works for single line comment&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Block
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;terraform&lt;/strong&gt; block is a special block used to configure &lt;strong&gt;Terraform itself&lt;/strong&gt;, not the infrastructure.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is used to set the Terraform version, the providers to download, and where to store the state file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;required_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&amp;gt;= 1.5.0"&lt;/span&gt;

    &lt;span class="n"&gt;required_providers&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;aws&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;source&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"hashicorp/aws"&lt;/span&gt;
            &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"~&amp;gt; 6.0"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&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="n"&gt;bucket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"my-terraform-state-bucket"&lt;/span&gt;
        &lt;span class="n"&gt;key&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"dev/terraform.tfstate"&lt;/span&gt;
        &lt;span class="n"&gt;region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&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;p&gt;Here,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;required_version&lt;/strong&gt; tells which Terraform CLI versions can run this configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;required_providers&lt;/strong&gt; tells which providers to download, and which versions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;backend&lt;/strong&gt; tells where Terraform should store the state file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Version constraints:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operator&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exactly this version&lt;/td&gt;
&lt;td&gt;&lt;code&gt;= 1.5.0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;!=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Any version except this one&lt;/td&gt;
&lt;td&gt;&lt;code&gt;!= 1.5.0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Greater than, or greater than or equal&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;gt;= 1.5.0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Less than, or less than or equal&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt; 2.0.0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;~&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Allows only the last number to increase&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;~&amp;gt; 6.0&lt;/code&gt; means 6.x, but not 7.0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; Variables or or functions and other references are &lt;strong&gt;not allowed&lt;/strong&gt; inside the terraform block. You have to use fixed values, so you cannot write &lt;code&gt;bucket = var.bucket_name&lt;/code&gt; in the backend block.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Provider, Resource, Data Sources, and Variables
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Provider:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A Terraform provider is a &lt;strong&gt;plugin&lt;/strong&gt; that enables Terraform to interact with a specific infrastructure or service provider. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Providers are responsible for &lt;strong&gt;translating the Terraform configurations into API calls that create, modify, or delete resources&lt;/strong&gt; in the target environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Providers are downloaded from the &lt;strong&gt;Terraform Registry&lt;/strong&gt; when you run &lt;code&gt;terraform init&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provider Syntax&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;provider&lt;/span&gt; &lt;span class="s2"&gt;"provider-name"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;argument1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"value1"&lt;/span&gt;
    &lt;span class="n"&gt;argument2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"value2"&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;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;span class="p"&gt;.&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&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;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;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"......"&lt;/span&gt;
    &lt;span class="n"&gt;argumentn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"valuen"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;region&lt;/span&gt; &lt;span class="o"&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;p&gt;Here, &lt;strong&gt;aws&lt;/strong&gt; is the provider, and it is configured to interact with AWS resources in the us-east-1 region.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Declaring the provider and its version:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is a good practice to tell Terraform which provider to download and which version to use. This is done inside the &lt;code&gt;terraform&lt;/code&gt; block.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;required_providers&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;aws&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;source&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"hashicorp/aws"&lt;/span&gt;
            &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"~&amp;gt; 6.0"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Here, &lt;strong&gt;source&lt;/strong&gt; is where Terraform downloads the provider from, and &lt;strong&gt;version&lt;/strong&gt; is a version constraint. &lt;code&gt;~&amp;gt; 6.0&lt;/code&gt; means any 6.x version, but not 7.0.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Never hardcode your AWS access key and secret key inside the provider block. Use an IAM role, AWS CLI profile or environment variables instead.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resource:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A resource in Terraform represents &lt;strong&gt;a piece of infrastructure&lt;/strong&gt; or a &lt;strong&gt;component&lt;/strong&gt; in a specific provider. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resources are the building blocks of your infrastructure, and they are declared in your Terraform configuration. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each resource has a type, a name, and a set of configuration parameters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Resource Syntax&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"type"&lt;/span&gt; &lt;span class="s2"&gt;"name"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;argument1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"value1"&lt;/span&gt;
    &lt;span class="n"&gt;argument2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"value2"&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;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;span class="p"&gt;.&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&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;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;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"......"&lt;/span&gt;
    &lt;span class="n"&gt;argumentn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"valuen"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;In this example, &lt;strong&gt;aws_instance&lt;/strong&gt; is the resource type, and example is the resource name. It represents an AWS EC2 instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The first part of the resource type tells you which provider it belongs to. For example, &lt;strong&gt;aws&lt;/strong&gt;_instance belongs to the aws provider.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resource type and resource name together form the &lt;strong&gt;resource address&lt;/strong&gt;, like &lt;code&gt;aws_instance.example&lt;/code&gt;. This is how you refer to this resource in other parts of the configuration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The AMI ID used above is just an example. AMI IDs are &lt;strong&gt;region specific&lt;/strong&gt;, so replace it with a valid AMI ID from your own region.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Data Sources:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Data sources in Terraform allow you to &lt;strong&gt;fetch information from an external system&lt;/strong&gt; or existing resources in your infrastructure. &lt;/li&gt;
&lt;li&gt;They are &lt;strong&gt;&lt;em&gt;read-only&lt;/em&gt;&lt;/strong&gt;. Terraform only reads the information, it does not create or manage anything.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data sources are not the same as &lt;code&gt;terraform import&lt;/code&gt;. A data source just looks up the information so that you can use it in your configuration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="s2"&gt;"aws_ami"&lt;/span&gt; &lt;span class="s2"&gt;"latest_amazon_linux"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;most_recent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="n"&gt;owners&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"amazon"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;name&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"name"&lt;/span&gt;
        &lt;span class="n"&gt;values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"al2023-ami-2023.*-x86_64"&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;p&gt;Here, &lt;strong&gt;aws_ami&lt;/strong&gt; is a data source that fetches information about the latest Amazon Linux 2023 AMI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To use the value, we refer to it with the &lt;strong&gt;data.&lt;/strong&gt; prefix:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;aws_ami&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;latest_amazon_linux&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; When you use &lt;code&gt;most_recent = true&lt;/code&gt;, the AMI returned by the data source changes whenever AWS publishes a new AMI. On the next &lt;code&gt;terraform plan&lt;/code&gt;, Terraform will see a different &lt;code&gt;ami&lt;/code&gt; value and will want to &lt;strong&gt;replace your running EC2 instance&lt;/strong&gt; (destroy and create again). This is not what we want for existing servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Say you created an EC2 instance today using the data source, and it picked AMI &lt;code&gt;ami-0aaa111&lt;/code&gt;. After a month AWS publishes a new Amazon Linux 2023 AMI &lt;code&gt;ami-0bbb222&lt;/code&gt;. When you run &lt;code&gt;terraform plan&lt;/code&gt; again without changing any code, you will see something like this:&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  # aws_instance.example must be replaced
-/+ resource "aws_instance" "example" {
      ~ ami = "ami-0aaa111" -&amp;gt; "ami-0bbb222" # forces replacement
        # (other attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;The &lt;code&gt;-/+&lt;/code&gt; symbol and the "forces replacement" comment mean that your running server will be destroyed and created again, even though you did not change anything in your code.&lt;/p&gt;

&lt;p&gt;There are two simple ways to avoid this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pin the AMI ID&lt;/strong&gt; using a variable or hardcode it, and update it only when you decide to.&lt;/li&gt;
&lt;li&gt;Keep the data source but add the lifecycle block below in the resource, so new instances get the latest AMI but the existing ones are left alone.&lt;/li&gt;
&lt;/ul&gt;


&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;aws_ami&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;latest_amazon_linux&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;

    &lt;span class="n"&gt;lifecycle&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;ignore_changes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ami&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;/blockquote&gt;

&lt;h3&gt;
  
  
  Variables:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Variables in Terraform are placeholders for values that can be used throughout your configuration. &lt;/li&gt;
&lt;li&gt;Variables allow you to parameterize your configurations, making them more flexible and reusable.
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variables can be declared in a separate file (like &lt;code&gt;variables.tf&lt;/code&gt;) or directly in the main configuration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;variable&lt;/span&gt; &lt;span class="s2"&gt;"aws_region"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;type&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;variable&lt;/span&gt; &lt;span class="s2"&gt;"ami_id"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;type&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"AMI ID for the EC2 instance (region specific)"&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&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="n"&gt;region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;aws_region&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ami_id&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;In this example, &lt;strong&gt;aws_region&lt;/strong&gt; and &lt;strong&gt;ami_id&lt;/strong&gt; are variables. They are referenced using the &lt;strong&gt;var.&lt;/strong&gt; prefix. The region is set in the &lt;strong&gt;provider&lt;/strong&gt; block, which is the usual place to set it. The AMI is pinned using a variable, so it only changes when you change it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Common variable types:&lt;/strong&gt; &lt;code&gt;string&lt;/code&gt;, &lt;code&gt;number&lt;/code&gt;, &lt;code&gt;bool&lt;/code&gt;, &lt;code&gt;list&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;object&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Other useful options inside a variable block:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;description&lt;/strong&gt;: explains what the variable is for&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;default&lt;/strong&gt;: value used when nothing else is provided&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;validation&lt;/strong&gt;: a rule to check the value before using it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sensitive&lt;/strong&gt;: hides the value in plan and apply output (the value is still stored in the state file)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ways to provide values for variables:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;default&lt;/code&gt; value inside the variable block&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;terraform.tfvars&lt;/code&gt; or &lt;code&gt;*.auto.tfvars&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;-var&lt;/code&gt; or &lt;code&gt;-var-file&lt;/code&gt; option on the command line&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform apply -var="aws_region=ap-south-1"
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Environment variables starting with &lt;code&gt;TF_VAR_&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export TF_VAR_aws_region=ap-south-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Arguments, Attributes, and Meta-arguments
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Arguments:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Arguments are the &lt;strong&gt;input parameters&lt;/strong&gt; that you provide when defining a block in Terraform. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;They represent the configuration details. Arguments are used in resources, data sources, providers and modules.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;In this example, &lt;strong&gt;ami&lt;/strong&gt; and &lt;strong&gt;instance_type&lt;/strong&gt; are arguments provided when creating an &lt;strong&gt;aws_instance&lt;/strong&gt; resource.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Attributes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Attributes are the &lt;strong&gt;values that you can read&lt;/strong&gt; from a resource (or a data source). &lt;/li&gt;
&lt;li&gt;This includes the arguments you have set, and also the values that AWS gives after the resource is created, like &lt;strong&gt;id&lt;/strong&gt;, &lt;strong&gt;arn&lt;/strong&gt; or &lt;strong&gt;public_ip&lt;/strong&gt;. These are called computed attributes, and you only know them after &lt;code&gt;terraform apply&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can reference these values in other parts of your Terraform configuration.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Format to refer an attribute: &lt;code&gt;resource_type.resource_name.attribute&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="s2"&gt;"instance_id"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;aws_instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Here, &lt;strong&gt;aws_instance.example.id&lt;/strong&gt; is an attribute of the &lt;strong&gt;aws_instance&lt;/strong&gt; resource, and we're creating an output named &lt;strong&gt;instance_id&lt;/strong&gt; to expose this value.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Arguments vs Attributes:&lt;/strong&gt; Arguments are what you &lt;strong&gt;give&lt;/strong&gt; to Terraform. Attributes are what you &lt;strong&gt;get back&lt;/strong&gt; (and read) from Terraform.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Meta-Arguments:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Meta-arguments are Terraform-specific arguments.
&lt;/li&gt;
&lt;li&gt;Meta-arguments are used to modify the behavior of resources or define how Terraform should manage certain aspects of the infrastructure. &lt;/li&gt;
&lt;li&gt;They can be used with any resource type, unlike normal arguments which depend on the provider.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There are five meta-arguments : &lt;strong&gt;&lt;em&gt;count&lt;/em&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;for_each&lt;/em&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;depends_on&lt;/em&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;provider&lt;/em&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;lifecycle&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;count&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;count&lt;/span&gt;         &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
    &lt;span class="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;

    &lt;span class="n"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"server-${count.index}"&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;p&gt;In this case, &lt;strong&gt;&lt;em&gt;count&lt;/em&gt;&lt;/strong&gt; is a meta-argument that specifies the &lt;strong&gt;number of instances to create&lt;/strong&gt;. &lt;strong&gt;count.index&lt;/strong&gt; gives the index of each instance (0, 1, 2 ...).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;for_each&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;for_each&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;toset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"app"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"db"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;

    &lt;span class="n"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;each&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&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;p&gt;Here, &lt;strong&gt;&lt;em&gt;for_each&lt;/em&gt;&lt;/strong&gt; creates one instance for each item in the set. &lt;strong&gt;each.key&lt;/strong&gt; gives the current item.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;count vs for_each:&lt;/strong&gt; Use &lt;strong&gt;&lt;em&gt;count&lt;/em&gt;&lt;/strong&gt; when you just need N identical copies. Use &lt;strong&gt;&lt;em&gt;for_each&lt;/em&gt;&lt;/strong&gt; when each item has its own identity (like web, app, db). With count, if you remove an item from the middle, the items after it get re-indexed and Terraform may destroy and recreate them. With for_each this does not happen because each resource is tracked by its key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;depends_on&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_instance"&lt;/span&gt; &lt;span class="s2"&gt;"web"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_instance"&lt;/span&gt; &lt;span class="s2"&gt;"db"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;

    &lt;span class="n"&gt;depends_on&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;aws_instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;web&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;p&gt;Here, &lt;strong&gt;&lt;em&gt;depends_on&lt;/em&gt;&lt;/strong&gt; is a meta-argument that establishes a &lt;strong&gt;dependency relationship between resources&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Implicit vs Explicit dependency:&lt;/strong&gt; Most of the time Terraform finds the order by itself. If one resource refers to another (like &lt;code&gt;aws_subnet.main.id&lt;/code&gt; inside an instance), Terraform understands that the subnet must be created first. This is an &lt;strong&gt;implicit dependency&lt;/strong&gt;. &lt;strong&gt;&lt;em&gt;depends_on&lt;/em&gt;&lt;/strong&gt; is an &lt;strong&gt;explicit dependency&lt;/strong&gt;, and it is needed only when there is a hidden dependency that Terraform cannot see from the references.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;provider&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&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="n"&gt;alias&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"mumbai"&lt;/span&gt;
    &lt;span class="n"&gt;region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ap-south-1"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_instance"&lt;/span&gt; &lt;span class="s2"&gt;"india_server"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;provider&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;aws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mumbai&lt;/span&gt;
    &lt;span class="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-xxxxxxxxxxxxxxxxx"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Here, &lt;strong&gt;&lt;em&gt;provider&lt;/em&gt;&lt;/strong&gt; tells Terraform to use a specific provider configuration (the one with alias &lt;strong&gt;mumbai&lt;/strong&gt;) for this resource. This is useful for multi-region or multi-account setups. Replace the AMI ID with one that exists in ap-south-1.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;lifecycle&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;

    &lt;span class="n"&gt;lifecycle&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;ignore_changes&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ami&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;prevent_destroy&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="n"&gt;create_before_destroy&lt;/span&gt; &lt;span class="o"&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;p&gt;Here, &lt;strong&gt;&lt;em&gt;lifecycle&lt;/em&gt;&lt;/strong&gt; changes how Terraform creates, updates or destroys the resource:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ignore_changes&lt;/strong&gt;: Terraform will not try to update the listed arguments, even if they change&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;prevent_destroy&lt;/strong&gt;: Terraform will give an error if any plan tries to destroy this resource&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;create_before_destroy&lt;/strong&gt;: the new resource is created first, and then the old one is destroyed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Outputs and Locals
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Outputs:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Outputs are used to &lt;strong&gt;print or expose values&lt;/strong&gt; after &lt;code&gt;terraform apply&lt;/code&gt;, like an instance ID or a public IP.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They are also used to pass values from a child module to the root module.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Public IP of the EC2 instance"&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;aws_instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;public_ip&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;You can see all the outputs again anytime using &lt;code&gt;terraform output&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Locals:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Locals are &lt;strong&gt;named values inside a configuration&lt;/strong&gt; that you can reuse in multiple places. They help avoid repeating the same expression again and again.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variables are the &lt;strong&gt;inputs&lt;/strong&gt; from outside, locals are calculated &lt;strong&gt;inside&lt;/strong&gt; the configuration and cannot be overridden from outside.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;locals&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;environment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"dev"&lt;/span&gt;
    &lt;span class="n"&gt;common_tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Project&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"terraform-demo"&lt;/span&gt;
        &lt;span class="nc"&gt;Env&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ami_id&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
    &lt;span class="n"&gt;tags&lt;/span&gt;          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;common_tags&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Note that the block is called &lt;strong&gt;locals&lt;/strong&gt; but we refer to the values using &lt;strong&gt;local.&lt;/strong&gt; (singular).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Expressions and References
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Expressions:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An expression is anything on the &lt;strong&gt;right side of an argument&lt;/strong&gt;. It can be a simple value, or a reference to something else, or a calculation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Simple values:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;name&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"web-server"&lt;/span&gt;          &lt;span class="c1"&gt;# string&lt;/span&gt;
&lt;span class="n"&gt;count&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;                     &lt;span class="c1"&gt;# number&lt;/span&gt;
&lt;span class="n"&gt;enabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;                  &lt;span class="c1"&gt;# bool&lt;/span&gt;
&lt;span class="n"&gt;azs&lt;/span&gt;     &lt;span class="o"&gt;=&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="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1b"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;   &lt;span class="c1"&gt;# list&lt;/span&gt;
&lt;span class="n"&gt;tags&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;Env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"dev"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;       &lt;span class="c1"&gt;# map&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  References:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;References are used to &lt;strong&gt;use the value of something that is defined somewhere else&lt;/strong&gt; in the configuration.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you refer to&lt;/th&gt;
&lt;th&gt;Reference format&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Variable&lt;/td&gt;
&lt;td&gt;&lt;code&gt;var.&amp;lt;name&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;var.aws_region&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local value&lt;/td&gt;
&lt;td&gt;&lt;code&gt;local.&amp;lt;name&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;local.common_tags&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resource&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;type&amp;gt;.&amp;lt;name&amp;gt;.&amp;lt;attribute&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;aws_instance.example.id&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data source&lt;/td&gt;
&lt;td&gt;&lt;code&gt;data.&amp;lt;type&amp;gt;.&amp;lt;name&amp;gt;.&amp;lt;attribute&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;data.aws_ami.latest.id&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Module output&lt;/td&gt;
&lt;td&gt;&lt;code&gt;module.&amp;lt;name&amp;gt;.&amp;lt;output&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;module.vpc.vpc_id&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Current count index&lt;/td&gt;
&lt;td&gt;&lt;code&gt;count.index&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;count.index&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Current for_each item&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;each.key&lt;/code&gt;, &lt;code&gt;each.value&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;each.key&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When a resource is created using &lt;strong&gt;count&lt;/strong&gt; or &lt;strong&gt;for_each&lt;/strong&gt;, we pick a specific one using an index or a key.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;aws_instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;          &lt;span class="c1"&gt;# when count is used&lt;/span&gt;
&lt;span class="n"&gt;aws_instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;      &lt;span class="c1"&gt;# when for_each is used&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When we use a reference, Terraform also understands the dependency, and creates things in the right order (the implicit dependency we discussed in meta-arguments).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  String Interpolation:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use &lt;code&gt;${ }&lt;/code&gt; to put a value inside a string.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"${var.environment}-web-server"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;If environment is &lt;strong&gt;dev&lt;/strong&gt;, the name becomes &lt;strong&gt;dev-web-server&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conditional Expression:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Format: &lt;code&gt;condition ? value_if_true : value_if_false&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"prod"&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;"t3.large"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Here, prod gets a t3.large, and every other environment gets a t2.micro.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Functions:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Terraform has many &lt;strong&gt;built-in functions&lt;/strong&gt; to work with values. You cannot create your own functions.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Format: &lt;code&gt;function_name(argument1, argument2)&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;length&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Number of items in a list or map&lt;/td&gt;
&lt;td&gt;&lt;code&gt;length(var.azs)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;join&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Joins list items into a string&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;join(",", ["a", "b"])&lt;/code&gt; gives &lt;code&gt;"a,b"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;upper&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Converts to upper case&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;upper("dev")&lt;/code&gt; gives &lt;code&gt;"DEV"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;toset&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Converts a list to a set&lt;/td&gt;
&lt;td&gt;&lt;code&gt;toset(["web", "app"])&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;lookup&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Gets a value from a map by key&lt;/td&gt;
&lt;td&gt;&lt;code&gt;lookup(var.ami_map, "us-east-1")&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;merge&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Combines multiple maps&lt;/td&gt;
&lt;td&gt;&lt;code&gt;merge(local.common_tags, { Name = "web" })&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can try any function using the &lt;code&gt;terraform console&lt;/code&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  For Expression:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A for expression is used to &lt;strong&gt;create a new list or map from an existing one&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;variable&lt;/span&gt; &lt;span class="s2"&gt;"names"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;type&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"app"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"db"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;locals&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;upper_names&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;names&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&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;p&gt;Here, &lt;strong&gt;upper_names&lt;/strong&gt; becomes &lt;code&gt;["WEB", "APP", "DB"]&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Splat Expression:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The splat expression &lt;code&gt;[*]&lt;/code&gt; is a shortcut to get one attribute from &lt;strong&gt;all&lt;/strong&gt; the resources created by count.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="s2"&gt;"all_instance_ids"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;aws_instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Modules
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A module is &lt;strong&gt;a group of Terraform files kept together in a folder&lt;/strong&gt;. It is used to package a set of resources so that you can reuse them.&lt;/li&gt;
&lt;li&gt;Every Terraform configuration is already a module. The folder where you run terraform commands is called the &lt;strong&gt;root module&lt;/strong&gt;. The modules that the root module calls are called &lt;strong&gt;child modules&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A module takes &lt;strong&gt;variables as inputs&lt;/strong&gt; and gives &lt;strong&gt;outputs&lt;/strong&gt; back.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Module Syntax&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;module&lt;/span&gt; &lt;span class="s2"&gt;"name"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"path or location of the module"&lt;/span&gt;
    &lt;span class="n"&gt;input1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"value1"&lt;/span&gt;
    &lt;span class="n"&gt;input2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"value2"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;module&lt;/span&gt; &lt;span class="s2"&gt;"web_server"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;source&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"./modules/ec2"&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="s2"&gt;"web_server_id"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;web_server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;instance_id&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Here, &lt;strong&gt;web_server&lt;/strong&gt; is the module name, and &lt;strong&gt;source&lt;/strong&gt; points to the folder where the module code is. &lt;strong&gt;instance_type&lt;/strong&gt; is an input variable of that module. To use an output of the module we use the &lt;strong&gt;module.&lt;/strong&gt; prefix.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;source&lt;/strong&gt; can be a local path, a module from the Terraform Registry, or a Git repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modules help us to avoid repeating code, keep a standard way of creating things, and keep large projects organized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Note: We will see modules in detail in a separate article.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Backend and State
&lt;/h2&gt;

&lt;h3&gt;
  
  
  State:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Terraform keeps a record of all the resources it has created and manages. This record is called the &lt;strong&gt;state&lt;/strong&gt;, and it is stored in a &lt;strong&gt;state file&lt;/strong&gt; (&lt;code&gt;terraform.tfstate&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The state file maps the resources in your configuration to the real resources in AWS.&lt;/li&gt;
&lt;li&gt;When you run &lt;code&gt;terraform plan&lt;/code&gt;, Terraform compares your &lt;strong&gt;configuration&lt;/strong&gt;, the &lt;strong&gt;state file&lt;/strong&gt; and the &lt;strong&gt;real infrastructure&lt;/strong&gt; to decide what needs to change.&lt;/li&gt;
&lt;li&gt;Do not edit the state file manually, and do not delete it. If it is lost, Terraform will not know about the resources it created.&lt;/li&gt;
&lt;li&gt;The state file can contain sensitive values in plain text, so keep it in a secure place.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Drift:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Drift is when the &lt;strong&gt;real infrastructure is different from what Terraform expects&lt;/strong&gt;, usually because someone changed a resource manually from the AWS console.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;terraform plan&lt;/code&gt; detects the drift and shows what it will change to bring the resource back to the configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Backend:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A backend defines &lt;strong&gt;where the state file is stored&lt;/strong&gt; and how Terraform operations run.&lt;/li&gt;
&lt;li&gt;By default, Terraform uses the &lt;strong&gt;local&lt;/strong&gt; backend, which stores the state file in the project folder.&lt;/li&gt;
&lt;li&gt;For team work, the state is stored in a &lt;strong&gt;remote backend&lt;/strong&gt; like an &lt;strong&gt;S3 bucket&lt;/strong&gt;, so that everyone uses the same state.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Backend is configured inside the &lt;strong&gt;terraform&lt;/strong&gt; block.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&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="n"&gt;bucket&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"my-terraform-state-bucket"&lt;/span&gt;
        &lt;span class="n"&gt;key&lt;/span&gt;          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"dev/terraform.tfstate"&lt;/span&gt;
        &lt;span class="n"&gt;region&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt;
        &lt;span class="n"&gt;encrypt&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="n"&gt;use_lockfile&lt;/span&gt; &lt;span class="o"&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;p&gt;Here, the state file is stored in the S3 bucket &lt;strong&gt;my-terraform-state-bucket&lt;/strong&gt; under the path &lt;strong&gt;dev/terraform.tfstate&lt;/strong&gt;. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State locking:&lt;/strong&gt; When someone is running &lt;code&gt;terraform apply&lt;/code&gt;, the state is locked so that two people cannot change it at the same time. With S3, locking is enabled using &lt;code&gt;use_lockfile = true&lt;/code&gt; in newer Terraform versions. Older setups use a DynamoDB table for locking with the &lt;code&gt;dynamodb_table&lt;/code&gt; argument.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After adding or changing a backend, run &lt;code&gt;terraform init&lt;/code&gt; again.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Note: We will see state and backend in detail in a separate article.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Other Important Terms
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Terraform Registry:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The Terraform Registry is the &lt;strong&gt;public library of providers and modules&lt;/strong&gt;, available at &lt;code&gt;registry.terraform.io&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;When you write &lt;code&gt;source = "hashicorp/aws"&lt;/code&gt;, Terraform downloads the aws provider from the Registry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dependency Lock File:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The file &lt;code&gt;.terraform.lock.hcl&lt;/code&gt; is created when you run &lt;code&gt;terraform init&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It records the &lt;strong&gt;exact provider versions&lt;/strong&gt; (and their checksums) that were selected, so that everyone in the team and the pipelines use the same versions.&lt;/li&gt;
&lt;li&gt;Commit this file to Git. To upgrade the provider versions later, run &lt;code&gt;terraform init -upgrade&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Workspaces:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Workspaces allow you to keep &lt;strong&gt;multiple state files for the same configuration&lt;/strong&gt;. For example, one for dev and one for test.&lt;/li&gt;
&lt;li&gt;Every configuration starts with one workspace called &lt;strong&gt;default&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Common commands:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform workspace list
terraform workspace new dev
terraform workspace select dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can use the current workspace name in the code with &lt;code&gt;terraform.workspace&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Provisioners:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Provisioners are used to &lt;strong&gt;run a script or a command&lt;/strong&gt; on the local machine or on a remote resource after the resource is created.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Common types are &lt;strong&gt;local-exec&lt;/strong&gt; (runs on the machine where Terraform is running), &lt;strong&gt;remote-exec&lt;/strong&gt; (runs on the remote resource) and &lt;strong&gt;file&lt;/strong&gt; (copies files to the remote resource).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&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="n"&gt;ami&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ami_id&lt;/span&gt;
    &lt;span class="n"&gt;instance_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;

    &lt;span class="n"&gt;provisioner&lt;/span&gt; &lt;span class="s2"&gt;"local-exec"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"echo ${self.private_ip} &amp;gt;&amp;gt; private_ips.txt"&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;p&gt;Here, after the instance is created, the private IP is saved to a file on the machine running Terraform.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; Provisioners should be used only as a &lt;strong&gt;last resort&lt;/strong&gt;. Terraform does not track what a provisioner did, so it cannot plan or fix it later. Prefer other options like &lt;strong&gt;user_data&lt;/strong&gt;, custom AMIs (Packer) or a configuration management tool like Ansible.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Term&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;AWS example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Block&lt;/td&gt;
&lt;td&gt;Container for configuration, made of block type, labels and body&lt;/td&gt;
&lt;td&gt;&lt;code&gt;resource "aws_instance" "example" { }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Label&lt;/td&gt;
&lt;td&gt;Name given after the block type&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;"aws_instance"&lt;/code&gt; and &lt;code&gt;"example"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terraform block&lt;/td&gt;
&lt;td&gt;Configures Terraform itself (version, providers, backend)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;terraform { required_version = "&amp;gt;= 1.5.0" }&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provider&lt;/td&gt;
&lt;td&gt;Plugin that talks to the platform's API&lt;/td&gt;
&lt;td&gt;&lt;code&gt;provider "aws"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resource&lt;/td&gt;
&lt;td&gt;Infrastructure that Terraform creates and manages&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;aws_instance&lt;/code&gt;, &lt;code&gt;aws_s3_bucket&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Source&lt;/td&gt;
&lt;td&gt;Read-only lookup of existing information&lt;/td&gt;
&lt;td&gt;&lt;code&gt;data "aws_ami"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Variable&lt;/td&gt;
&lt;td&gt;Input value to the configuration&lt;/td&gt;
&lt;td&gt;&lt;code&gt;var.aws_region&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argument&lt;/td&gt;
&lt;td&gt;Input you give to a block&lt;/td&gt;
&lt;td&gt;&lt;code&gt;instance_type = "t2.micro"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Attribute&lt;/td&gt;
&lt;td&gt;Value you can read from a resource&lt;/td&gt;
&lt;td&gt;&lt;code&gt;aws_instance.example.id&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Meta-argument&lt;/td&gt;
&lt;td&gt;Terraform-specific argument usable on any resource&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;count&lt;/code&gt;, &lt;code&gt;for_each&lt;/code&gt;, &lt;code&gt;depends_on&lt;/code&gt;, &lt;code&gt;provider&lt;/code&gt;, &lt;code&gt;lifecycle&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output&lt;/td&gt;
&lt;td&gt;Value printed or exposed after apply&lt;/td&gt;
&lt;td&gt;&lt;code&gt;output "instance_id"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local&lt;/td&gt;
&lt;td&gt;Reusable named value inside the configuration&lt;/td&gt;
&lt;td&gt;&lt;code&gt;local.common_tags&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression&lt;/td&gt;
&lt;td&gt;Anything on the right side of an argument (value, reference, function, condition)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;var.env == "prod" ? "t3.large" : "t2.micro"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Module&lt;/td&gt;
&lt;td&gt;Group of Terraform files reused as a package&lt;/td&gt;
&lt;td&gt;&lt;code&gt;module "web_server"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;State&lt;/td&gt;
&lt;td&gt;Record of the resources Terraform manages&lt;/td&gt;
&lt;td&gt;&lt;code&gt;terraform.tfstate&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Drift&lt;/td&gt;
&lt;td&gt;Real infrastructure differs from the state or configuration&lt;/td&gt;
&lt;td&gt;Security group edited in the AWS console&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Where the state file is stored&lt;/td&gt;
&lt;td&gt;&lt;code&gt;backend "s3"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Registry&lt;/td&gt;
&lt;td&gt;Public library of providers and modules&lt;/td&gt;
&lt;td&gt;&lt;code&gt;registry.terraform.io&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lock file&lt;/td&gt;
&lt;td&gt;Records the exact provider versions used&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.terraform.lock.hcl&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workspace&lt;/td&gt;
&lt;td&gt;Separate state for the same configuration&lt;/td&gt;
&lt;td&gt;&lt;code&gt;terraform workspace new dev&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provisioner&lt;/td&gt;
&lt;td&gt;Runs a script after a resource is created (last resort)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;local-exec&lt;/code&gt;, &lt;code&gt;remote-exec&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Terraform official documentation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/syntax/configuration" rel="noopener noreferrer"&gt;Configuration syntax (blocks, arguments, comments)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/block/terraform" rel="noopener noreferrer"&gt;terraform block reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/resources/syntax" rel="noopener noreferrer"&gt;Resource block reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/meta-arguments" rel="noopener noreferrer"&gt;Meta-arguments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/values/variables" rel="noopener noreferrer"&gt;Input variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/modules" rel="noopener noreferrer"&gt;Modules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/state" rel="noopener noreferrer"&gt;State&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/backend/s3" rel="noopener noreferrer"&gt;S3 backend&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/files/dependency-lock" rel="noopener noreferrer"&gt;Dependency lock file&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/provisioners" rel="noopener noreferrer"&gt;Provisioners&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Terraform Registry and AWS provider&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/browse/providers" rel="noopener noreferrer"&gt;Terraform Registry (providers)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs" rel="noopener noreferrer"&gt;AWS provider documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance" rel="noopener noreferrer"&gt;aws_instance resource&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami" rel="noopener noreferrer"&gt;aws_ami data source&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;My notes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/venkateshk111/terraform-beginners-guide" rel="noopener noreferrer"&gt;terraform-beginners-guide on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;These are the basic terms that you will see in almost every Terraform project. Once you are comfortable with blocks, arguments, attributes and references, reading other people’s code becomes much easier. Topics like modules and state are big ones, so I will cover them in detail in separate articles.&lt;/p&gt;

&lt;p&gt;I have kept all these notes, along with the code examples, in my GitHub repo. You can check it here:&lt;br&gt;
&lt;a href="https://github.com/venkateshk111/terraform-beginners-guide" rel="noopener noreferrer"&gt;https://github.com/venkateshk111/terraform-beginners-guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find it useful, give the repo a star, and let me know in the comments if I missed any term that confused you when you started learning Terraform. I will add it.&lt;/p&gt;

&lt;p&gt;Thanks for reading! If this was helpful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❤️ Like if it added value&lt;/li&gt;
&lt;li&gt;💾 Save for later&lt;/li&gt;
&lt;li&gt;🔄 Share with your team&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Let's connect and discuss Cloud:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/venkatesh111/" rel="noopener noreferrer"&gt;LinkedIn : @venkatesh111&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://x.com/venkatesh111" rel="noopener noreferrer"&gt;X        : @venkatesh111&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/@letuscloud" rel="noopener noreferrer"&gt;YouTube  : @LetUsCloud&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;#Cloud #DevOps #AWS #Terraform #AWSCommunity #LetUsCloud&lt;/p&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>devops</category>
      <category>letuscloud</category>
    </item>
    <item>
      <title>AWS Solutions Architect Associate Cheat Sheet</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Sun, 31 Aug 2025 13:18:37 +0000</pubDate>
      <link>https://dev.to/venkatesh111/aws-solutions-architect-associate-cheat-sheet-4pfj</link>
      <guid>https://dev.to/venkatesh111/aws-solutions-architect-associate-cheat-sheet-4pfj</guid>
      <description>&lt;h2&gt;
  
  
  AWS Solutions Architect Associate Cheat Sheet
&lt;/h2&gt;

&lt;h2&gt;
  
  
  About This Cheat Sheet
&lt;/h2&gt;

&lt;p&gt;This cheat sheet was prepared based on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Udemy Practice tests by Jon Bonso, Neal Davis, Stephane Maarek&lt;/li&gt;
&lt;li&gt;AWS Documentation&lt;/li&gt;
&lt;li&gt;AWS FAQ&lt;/li&gt;
&lt;li&gt;AWS Whitepapers&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This sheet is for last-minute or quick reference only. These were my notes for a final day glance before the actual SAA exam.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;p&gt;All credits to excellent SAA-C03 course and practice tests by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Adrian Cantrill&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chad Smith&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Jon Bonso&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Neal Davis&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ranga Karnam&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stephane Maarek&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can enroll in &lt;strong&gt;any ONE of the courses listed below + Practice Exams&lt;/strong&gt; to gain knowledge and clear the certification.&lt;/p&gt;




&lt;h2&gt;
  
  
  Course Links
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Adrian Cantrill Course
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.cantrill.io/p/aws-certified-solutions-architect-associate-saa-c02" rel="noopener noreferrer"&gt;AWS Certified Solutions Architect Associate SAA-C02&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Chad Smith O'Reilly Live Classes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://learning.oreilly.com" rel="noopener noreferrer"&gt;O'Reilly Learning&lt;/a&gt; (search by "author: Chad Smith")&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Jon Bonso Practice Tests
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://portal.tutorialsdojo.com/courses/aws-certified-solutions-architect-associate-practice-exams/" rel="noopener noreferrer"&gt;Tutorials Dojo Practice Exams&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/course/aws-certified-solutions-architect-associate-amazon-practice-exams-saa-c03/" rel="noopener noreferrer"&gt;Udemy SAA-C03 Practice Exams&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Neal Davis Course &amp;amp; Practice Tests
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/course/aws-certified-solutions-architect-associate-hands-on/" rel="noopener noreferrer"&gt;Udemy Hands-on Course&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/course/aws-certified-solutions-architect-associate-practice-tests-k/" rel="noopener noreferrer"&gt;Udemy Practice Tests&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Ranga Karnam Course and Exam Review
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/course/aws-certified-solutions-architect-associate-step-by-step/" rel="noopener noreferrer"&gt;Udemy Step-by-Step Course&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/course/exam-aws-certified-solution-architect-associate/" rel="noopener noreferrer"&gt;Udemy Exam Review&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Stephane Maarek Course &amp;amp; Practice Tests
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/course/aws-certified-solutions-architect-associate-saa-c02/" rel="noopener noreferrer"&gt;Udemy SAA-C02 Course&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/course/practice-exams-aws-certified-solutions-architect-associate/" rel="noopener noreferrer"&gt;Udemy Practice Exams&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  In-Detail Cheat Sheets by Neal and Jon
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://digitalcloud.training/category/aws-cheat-sheets/aws-solutions-architect-associate/" rel="noopener noreferrer"&gt;Digital Cloud Training Cheat Sheets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tutorialsdojo.com/aws-cheat-sheets/" rel="noopener noreferrer"&gt;Tutorials Dojo AWS Cheat Sheets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Official Study Guides and Trainings
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://d1.awsstatic.com/training-and-certification/docs-sa-assoc/AWS-Certified-Solutions-Architect-Associate_Exam-Guide.pdf" rel="noopener noreferrer"&gt;AWS Certified Solutions Architect Associate Exam Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://d1.awsstatic.com/training-and-certification/docs-sa-assoc/AWS-Certified-Solutions-Architect-Associate_Exam-Guide_C03.pdf" rel="noopener noreferrer"&gt;AWS Certified Solutions Architect Associate Exam Guide C03&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://d1.awsstatic.com/training-and-certification/docs-sa-assoc/AWS-Certified-Solutions-Architect-Associate_Sample-Questions.pdf" rel="noopener noreferrer"&gt;AWS Certified Solutions Architect Associate Sample Questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://explore.skillbuilder.aws/learn/course/external/view/elearning/125/exam-readiness-aws-certified-solutions-architect-associate-digital" rel="noopener noreferrer"&gt;Exam Readiness Course&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  SAA-C03 Update Information
&lt;/h2&gt;

&lt;p&gt;The new exam SAA-C03 started from &lt;strong&gt;Aug-2022&lt;/strong&gt;. Only the weight distribution for domains changed; no major changes from SAA-C02. See &lt;a href="https://tutorialsdojo.com/whats-new-with-the-saa-c03-aws-certified-solutions-architect-associate-exam-this-2022/" rel="noopener noreferrer"&gt;What's New with the SAA-C03&lt;/a&gt; by Jon Bonso.&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/.%2Fassets%2F06-aws-saa-c03-cheat-sheet%2F01-c02-c03.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/.%2Fassets%2F06-aws-saa-c03-cheat-sheet%2F01-c02-c03.png" alt="SAA-C02 vs SAA-C03" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  My Tips on Practice Exams
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Practice exams are &lt;strong&gt;not to determine pass/fail&lt;/strong&gt;, but to &lt;strong&gt;test your understanding of AWS services&lt;/strong&gt; and &lt;strong&gt;choose the most appropriate service for a scenario&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Read the entire question and every option, &lt;strong&gt;think like a Solution Architect&lt;/strong&gt;, and &lt;strong&gt;eliminate wrong answers&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google for help during practice exams&lt;/strong&gt; (not answers), to learn and make notes.&lt;/li&gt;
&lt;li&gt;After completion, &lt;strong&gt;check explanations for every answer and make notes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Actual SAA-C03 is easier than practice exams&lt;/strong&gt; (practice tests help you learn and prepare).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Connect with the Author
&lt;/h2&gt;

&lt;p&gt;Are you preparing for SAA-C03? Have doubts or want to collaborate for AWS/DevOps certifications? Connect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Twitter: &lt;a href="https://twitter.com/venkatesh111" rel="noopener noreferrer"&gt;venkatesh111&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;LinkedIn: &lt;a href="https://www.linkedin.com/in/venkatesh111/" rel="noopener noreferrer"&gt;venkatesh111&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If planning for &lt;strong&gt;AWS Certified Developer Associate&lt;/strong&gt;, see: &lt;a href="https://sites.google.com/view/aws-dva-c01-cheat-sheet" rel="noopener noreferrer"&gt;AWS DVA-C01 Cheat Sheet&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Words - to watch out for in questions !
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Region
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Physical or &lt;strong&gt;Geographical location&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Made up of &lt;strong&gt;two or more Availability Zones&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Each region is isolated from others&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple Availability Zones&lt;/strong&gt; per region&lt;/li&gt;
&lt;li&gt;Data replication across regions is possible&lt;/li&gt;
&lt;li&gt;Communication between regions via public internet&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  AWS Region Examples
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;us-east-1&lt;/td&gt;
&lt;td&gt;US East (N. Virginia)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ap-south-1&lt;/td&gt;
&lt;td&gt;Asia Pacific (Mumbai)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;eu-west-2&lt;/td&gt;
&lt;td&gt;Europe (London)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;me-south-1&lt;/td&gt;
&lt;td&gt;Middle East (Bahrain)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Availability Zone
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Group of &lt;strong&gt;one or more discrete data centres&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Redundant power, networking, connectivity&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Low latency, high throughput, highly redundant network&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Highly available, fault tolerant, scalable infrastructure&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Durability
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Likelihood of data loss&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Example: Multiple copies of data in different locations increases durability&lt;/li&gt;
&lt;li&gt;AWS S3 offers &lt;strong&gt;99.999999999% durability&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Availability
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How readily a service is available&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Example: More ATM machines = higher availability&lt;/li&gt;
&lt;li&gt;Deploying EC2/RDS in multiple AZs increases availability&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resilient
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recover from failure&lt;/strong&gt; induced by load, attacks, failures&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Partial system failure doesn't take down the whole system&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Fault Tolerant
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;System remains operational even if some components fail&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Services
&lt;/h2&gt;

&lt;h2&gt;
  
  
  IAM
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Explicit deny policy always overrides explicit allow&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  IAM Roles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using IAM Role for EC2, ASG is more secure than providing access via IAM user&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ECS tasks can also be assigned with IAM ROLES&lt;/strong&gt; just like IAM Role or EC2 instances&lt;/li&gt;
&lt;li&gt;Want EC2 instance to access other AWS services (Example S3) use IAM ROLE&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sharing CloudTrail logs between AWS accounts&lt;/strong&gt; then use IAM Roles&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cross Account Access
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Your developers/Ops want to access particular resources in 2 or more different (PROD, TEST) AWS accounts&lt;/li&gt;
&lt;li&gt;Temporary access to resources in a second account (use with STS)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Custom Identity Broker
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;If your On-Prem LDAP is not compatible with SAML, and you want users to use LDAP to authenticate to AWS use &lt;strong&gt;custom identity brokers&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You &lt;strong&gt;cannot attach IAM Role to On-Prem Instances&lt;/strong&gt;, use IAM credentials&lt;/p&gt;

&lt;h3&gt;
  
  
  External ID
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;give a third-party access to your AWS resources&lt;/strong&gt; (delegate access)&lt;/li&gt;
&lt;li&gt;Monitor your AWS account and help optimize costs&lt;/li&gt;
&lt;li&gt;Perform some analytics etc&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  IAM Best Practices
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Lock away your AWS account root user access keys&lt;/li&gt;
&lt;li&gt;Create individual IAM users&lt;/li&gt;
&lt;li&gt;Enable MFA&lt;/li&gt;
&lt;li&gt;Use user groups&lt;/li&gt;
&lt;li&gt;Grant least privilege&lt;/li&gt;
&lt;li&gt;Use roles for applications that run on Amazon EC2 instances&lt;/li&gt;
&lt;li&gt;Use roles to delegate permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html" rel="noopener noreferrer"&gt;AWS IAM Best Practices Documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IAM permissions boundaries&lt;/strong&gt; helps you to restrict AWS IAM admin access and prevent privilege escalation, or allowing them to bypass any other security rules.&lt;/p&gt;




&lt;h2&gt;
  
  
  S3
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Storage Classes Overview
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Storage Class&lt;/th&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;Retrieval Time&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;S3 Intelligent-Tiering&lt;/td&gt;
&lt;td&gt;Unpredictable/changing access patterns&lt;/td&gt;
&lt;td&gt;Milliseconds&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S3 Standard&lt;/td&gt;
&lt;td&gt;Frequently accessed data (&amp;gt;1/month)&lt;/td&gt;
&lt;td&gt;Milliseconds&lt;/td&gt;
&lt;td&gt;Standard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S3 Standard-IA&lt;/td&gt;
&lt;td&gt;Infrequently accessed, retained ≥1 month&lt;/td&gt;
&lt;td&gt;Milliseconds&lt;/td&gt;
&lt;td&gt;Lower&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S3 One Zone-IA&lt;/td&gt;
&lt;td&gt;Reproducible, lower resiliency requirement&lt;/td&gt;
&lt;td&gt;Milliseconds&lt;/td&gt;
&lt;td&gt;Lowest IA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S3 Glacier Instant Retrieval&lt;/td&gt;
&lt;td&gt;Rarely accessed, immediate retrieval needed&lt;/td&gt;
&lt;td&gt;Milliseconds&lt;/td&gt;
&lt;td&gt;Archive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S3 Glacier Flexible Retrieval&lt;/td&gt;
&lt;td&gt;Rarely accessed, minutes–hours retrieval&lt;/td&gt;
&lt;td&gt;1–12 hours&lt;/td&gt;
&lt;td&gt;Archive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S3 Glacier Deep Archive&lt;/td&gt;
&lt;td&gt;Lowest cost, hours retrieval&lt;/td&gt;
&lt;td&gt;12–48 hours&lt;/td&gt;
&lt;td&gt;Lowest&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Glacier Retrieval Options
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Storage Class&lt;/th&gt;
&lt;th&gt;Expedited&lt;/th&gt;
&lt;th&gt;Standard&lt;/th&gt;
&lt;th&gt;Bulk&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;S3 Glacier Instant Retrieval&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S3 Glacier Flexible Retrieval&lt;/td&gt;
&lt;td&gt;1–5 min&lt;/td&gt;
&lt;td&gt;3–5 hours&lt;/td&gt;
&lt;td&gt;5–12 hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S3 Glacier Deep Archive&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;≤12 hours&lt;/td&gt;
&lt;td&gt;≤48 hours&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Replication at S3
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;SRR – Same Region Replication&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;strong&gt;Aggregate logs into a single bucket&lt;/strong&gt; – If you store logs in multiple buckets or across multiple accounts, you can easily replicate logs into a single, in-Region bucket. Doing so allows for simpler processing of logs in a single location.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Configure live replication between production and test accounts&lt;/strong&gt; – If you or your customers have production and test accounts that use the same data, you can replicate objects between those multiple accounts, while maintaining object metadata.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Abide by data sovereignty laws&lt;/strong&gt; – You might be required to store multiple copies of your data in separate AWS accounts within a certain Region. Same-Region Replication can help you automatically replicate critical data when compliance regulations don't allow the data to leave your country.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Encryption at S3
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Server-Side Encryption&lt;/strong&gt;&lt;br&gt;
Request Amazon S3 to encrypt your object before saving it on disks in its data centers and then decrypt it when you download the objects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Client-Side Encryption&lt;/strong&gt;&lt;br&gt;
Encrypt data client-side and upload the encrypted data to Amazon S3. In this case, you manage the encryption process, the encryption keys, and related tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS KMS (SSE-KMS)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encryption at rest&lt;/li&gt;
&lt;li&gt;Automatic key rotation every 1 year&lt;/li&gt;
&lt;li&gt;Operational efficiency (least manual efforts)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Server-side Encryption (SSE):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer Provided Keys (SSE-C)&lt;/li&gt;
&lt;li&gt;S3 Managed Keys (SSE-S3)&lt;/li&gt;
&lt;li&gt;KMS Managed Keys (SSE-KMS)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Client-side Encryption (CSE):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer managed master encryption keys (CSE-C)&lt;/li&gt;
&lt;li&gt;KMS managed master encryption keys (CSE-KMS)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In order to ensure all objects uploaded to S3 are encrypted, create an S3 bucket policy that denies any S3 Put request that does not include the &lt;code&gt;x-amz-server-side-encryption&lt;/code&gt; header.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;s3:x-amz-server-side-encryption: AES256&lt;/code&gt; → use S3-managed keys&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;s3:x-amz-server-side-encryption: aws:kms&lt;/code&gt; → use AWS KMS managed keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/security/how-to-prevent-uploads-of-unencrypted-objects-to-amazon-s3/" rel="noopener noreferrer"&gt;https://aws.amazon.com/blogs/security/how-to-prevent-uploads-of-unencrypted-objects-to-amazon-s3/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For cost effective analysis on data stored on S3 use &lt;strong&gt;Amazon Athena&lt;/strong&gt; to run SQL queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  S3 Object Lock
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;prevent deleting or modifying object for fixed amount of time.&lt;/li&gt;
&lt;li&gt;Object Lock can help prevent objects from being deleted or overwritten for a fixed amount of time or indefinitely&lt;/li&gt;
&lt;li&gt;Object Lock to help meet regulatory requirements that require WORM (write-once-read-many) storage&lt;/li&gt;
&lt;li&gt;Adds layer of protection against object changes and deletion&lt;/li&gt;
&lt;li&gt;Object locks must be enabled at the time of creation of buckets (new bucket)&lt;/li&gt;
&lt;li&gt;Bucket versioning is automatically enabled (cant be disabled) for Object lock enabled buckets&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  S3 Static website hosting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Only for static content, can also contain client-side scripts.&lt;/li&gt;
&lt;li&gt;Does NOT support Server-side processing/scripting like PHP, JSP, or ASP.NET.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Accessing S3 from EC2 or ECS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;IAM Role or Instance profile attached to EC2 to access S3&lt;/li&gt;
&lt;li&gt;Data transfer between S3 and EC2 in same region is FREE&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  S3 Transfer Acceleration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;fast, easy, and secure transfers of files over long distances between your client and an S3 bucket&lt;/li&gt;
&lt;li&gt;S3 Transfer acceleration uses globally distributed edge locations in Amazon CloudFront&lt;/li&gt;
&lt;li&gt;Additional data transfer charges might apply.&lt;/li&gt;
&lt;li&gt;Use for large scale (more than 20GB) download and upload of data into S3 from various edge location&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use cases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your customers upload to a centralized bucket from all over the world.&lt;/li&gt;
&lt;li&gt;You transfer gigabytes to terabytes of data on a regular basis across continents.&lt;/li&gt;
&lt;li&gt;You can't use all of your available bandwidth over the internet when uploading to Amazon S3.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  S3 Cost
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Enabling versioning will have additional cost (each versioned objects are charged)&lt;/li&gt;
&lt;li&gt;Incomplete S3 multipart uploads are charged&lt;/li&gt;
&lt;li&gt;Data transfer cost between S3 buckets in same region is free&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  VPC endpoint and S3
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;VPC endpoint for Amazon S3 to upload files/images from EC2 instance in private subnet&lt;/li&gt;
&lt;li&gt;VPC endpoint for Amazon S3 reduces Direct connect costs&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Gateway Endpoint for S3&lt;/th&gt;
&lt;th&gt;Interface Endpoint for S3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Network Traffic&lt;/td&gt;
&lt;td&gt;Remains on AWS network&lt;/td&gt;
&lt;td&gt;Remains on AWS network&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IP Addresses Used&lt;/td&gt;
&lt;td&gt;Amazon S3 public IP addresses&lt;/td&gt;
&lt;td&gt;Private IP addresses from your VPC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access from On-Premises&lt;/td&gt;
&lt;td&gt;No access&lt;/td&gt;
&lt;td&gt;Allows access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access from Another AWS Region&lt;/td&gt;
&lt;td&gt;No access&lt;/td&gt;
&lt;td&gt;Allows access via VPC peering or Transit Gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Not free&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  EFS
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;EFS provides &lt;strong&gt;hierarchical directory structure&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Can be used with &lt;strong&gt;both AWS and on-premises&lt;/strong&gt; resources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Access the files concurrently by multiple EC2 instances&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Multiple compute instances, including &lt;strong&gt;EC2, ECS (both Fargate and EC2 nodes), and Lambda, can access an EFS file system at the same time&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  EFS Storage Classes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Reduce storage cost by moving to different EFS storage classes&lt;/li&gt;
&lt;li&gt;EFS will &lt;strong&gt;automatically and transparently move your files&lt;/strong&gt; to the lower cost regional EFS Standard-IA or EFS One Zone-IA based on the last time they were accessed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon EFS Intelligent-Tiering&lt;/strong&gt;: moves the files between storage class&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  EFS Storage classes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;EFS Standard-IA&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EFS One Zone-IA&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Bursting Throughput mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It is the default mode, the amount of throughput scales as your file system grows, the more you store, the more throughput is available to you.&lt;/li&gt;
&lt;li&gt;Does not incur any additional charges and you have a baseline rate of 50 KB/s per GB of throughput that comes included with the price you pay for your EFS standard storage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Provisioned Throughput mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Allows you to &lt;strong&gt;burst above your allocated allowance&lt;/strong&gt;, which is based upon your file system size, so if your file system was relatively small but the use case for your file system required a high throughput rate, then the default bursting throughput options may not be able to process your request quickly enough. In this instance, you would need to use provisioned throughput.&lt;/li&gt;
&lt;li&gt;This option does incur additional charges where you will need to pay for any bursting above the default capacity allowed from the standard bursting throughput.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Amazon FSx
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Amazon FSx for Windows File Server
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Distributed File System Replication (&lt;strong&gt;DFSR&lt;/strong&gt;) ↔ &lt;strong&gt;Amazon FSx&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Accessible over Server Message Block &lt;strong&gt;(SMB) protocol&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Amazon FSx is &lt;strong&gt;accessible from Windows, Linux, and MacOS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You can use Active Directory domain for authentication&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Amazon FSx for Lustre
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Enable high performance computing (HPC)&lt;/li&gt;
&lt;li&gt;Mounting &lt;strong&gt;FSx for Lustre on an AWS Fargate&lt;/strong&gt; launch type &lt;strong&gt;isn't supported&lt;/strong&gt;. (Use EFS)&lt;/li&gt;
&lt;li&gt;Can be mounted on EC2 worker nodes&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Snowball Edge
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Offline data transfer&lt;/strong&gt; from remote areas (or on-prem) to AWS&lt;/li&gt;
&lt;li&gt;Unstable internet connection&lt;/li&gt;
&lt;li&gt;It has &lt;strong&gt;on-board storage and compute power&lt;/strong&gt;, Provides you with storage and processing capacity&lt;/li&gt;
&lt;li&gt;Support local &lt;strong&gt;data processing and collection in disconnected environments&lt;/strong&gt; such as &lt;strong&gt;ships, windmills&lt;/strong&gt;, and &lt;strong&gt;remote factories&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - Used by &lt;strong&gt;disaster response team&lt;/strong&gt; in case of natural disasters like &lt;strong&gt;hurricane&lt;/strong&gt;, &lt;strong&gt;storm&lt;/strong&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  AWS DataSync
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Online data transfer&lt;/strong&gt; from on-prem to AWS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unstable internet connection&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Can be used even with &lt;strong&gt;loss of Internet access for brief time&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;If a task is interrupted, for instance, if the network connection goes down or the AWS DataSync agent is restarted, the next run of the task will transfer missing files, and the data will be complete and consistent at the end of this run.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;AWS DataSync is a &lt;strong&gt;secure&lt;/strong&gt;, &lt;strong&gt;online service&lt;/strong&gt; that automates and accelerates &lt;strong&gt;moving data&lt;/strong&gt; &lt;strong&gt;between on premises and AWS storage services&lt;/strong&gt;
&lt;/li&gt;

&lt;li&gt;DataSync can copy data between:

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;NFS, SMB, HDFS (Hadoop), EFS, FSx&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Self-managed object storage, AWS &lt;strong&gt;Snowcone&lt;/strong&gt;, AWS &lt;strong&gt;S3&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Migrate SMB/NFS&lt;/strong&gt; from On-Prem to AWS than choice is &lt;strong&gt;AWS DataSync&lt;/strong&gt;
&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Use cases&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Migrate&lt;/strong&gt; your data to AWS, &lt;strong&gt;Move data between on-premises and AWS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduce on-premises storage costs&lt;/strong&gt; by moving data directly to S3 Glacier&lt;/li&gt;
&lt;li&gt;Replicate your data into AWS S3&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Storage Gateway
&lt;/h2&gt;

&lt;h3&gt;
  
  
  File Gateway
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NFS/SMB&lt;/strong&gt;, over &lt;strong&gt;file protocol&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Supports &lt;strong&gt;local (on-prem) caching&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Amazon S3 File Gateway
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Useful if you have application making use of EFS to gather and store the content and they may be processed by numerous Amazon EC2 Linux instances&lt;/li&gt;
&lt;li&gt;Data lakes, backups, and ML workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Amazon FSx File Gateway
&lt;/h4&gt;

&lt;h3&gt;
  
  
  Volume Gateway
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;iSCSI block storage&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hybrid cloud block storage&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Supports &lt;strong&gt;local (on-prem) caching&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Volume Gateway stores and manages on-premises data in Amazon S3 on your behalf&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;take point-in-time copies&lt;/strong&gt; of your volumes (cached or stored) using &lt;strong&gt;AWS Backup&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cached Volume Gateway
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary data&lt;/strong&gt; is stored in &lt;strong&gt;Amazon S3&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frequently accessed data is retained locally&lt;/strong&gt; (On-Prem) in the cache for &lt;strong&gt;low latency access&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Stored Volume Gateway
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary data&lt;/strong&gt; is stored &lt;strong&gt;locally&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entire dataset is available for low latency access&lt;/strong&gt; on premises while also &lt;strong&gt;asynchronously getting backed up to Amazon S3&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tape Gateway
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;iSCSI VTL&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Replacement for your on-prem physical tapes, without changing existing backup workflows&lt;/li&gt;
&lt;li&gt;Supports &lt;strong&gt;local (on-prem) caching, Caches virtual tapes&lt;/strong&gt; on premises for &lt;strong&gt;low-latency data access&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Encrypts data between the gateway and AWS for secure data transfer&lt;/li&gt;
&lt;li&gt;Transitions virtual tapes &lt;strong&gt;between Amazon S3 and Amazon S3 Glacier Flexible Retrieval, or Amazon S3 Glacier Deep Archive&lt;/strong&gt;, to &lt;strong&gt;minimize storage costs&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  CloudFront
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;geographic restrictions (geo blocking)&lt;/strong&gt; to &lt;strong&gt;prevent/block users in specific geographic locations (nations) from accessing content&lt;/strong&gt; that you're distributing through a CloudFront distribution&lt;/li&gt;
&lt;li&gt;You can use CloudFront for &lt;strong&gt;on demand (VOD) or live streaming (real time) video&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;To reduce latency&lt;/strong&gt; of the images/files hosted on S3 bucket use CloudFront&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache media&lt;/strong&gt;, can serve secret/private content&lt;/li&gt;
&lt;li&gt;CloudFront is used for only Delivery (CDN) max download size over CloudFront is 20GB&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  CloudFront Origin Access Identity (OAI)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Restrict&lt;/strong&gt; access to &lt;strong&gt;Amazon S3&lt;/strong&gt; bucket so that &lt;strong&gt;objects can be accessed only through my Amazon CloudFront distribution&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  High Availability with CloudFront
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You create an &lt;strong&gt;origin group with two origins&lt;/strong&gt;: a &lt;strong&gt;primary&lt;/strong&gt; and a &lt;strong&gt;secondary&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;If the primary origin is unavailable CloudFront automatically switches to the secondary origin&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;

&lt;p&gt;You have s3 bucket in us-west-1 and data is being replicated to ap-southeast-1 then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create an &lt;strong&gt;additional CloudFront origin pointing&lt;/strong&gt; to the ap-southeast-1 bucket&lt;/li&gt;
&lt;li&gt;Set up a CloudFront origin group with the &lt;strong&gt;us-west-1&lt;/strong&gt; bucket as the &lt;strong&gt;primary&lt;/strong&gt; and the &lt;strong&gt;ap-southeast-1&lt;/strong&gt; bucket as the &lt;strong&gt;secondary&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Field-Level Encryption
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Adds an &lt;strong&gt;additional layer of security&lt;/strong&gt; that lets you protect specific data throughout system processing so that &lt;strong&gt;only certain applications can see it&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enable your users to &lt;strong&gt;securely upload sensitive information to your web servers&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Lambda@Edge
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Customized material (from website) &lt;strong&gt;depending on the device (mobile, desktop, tablet)&lt;/strong&gt; from which they view the website&lt;/li&gt;
&lt;li&gt;Improve search engine optimization (SEO) for your website&lt;/li&gt;
&lt;li&gt;Route requests to different origins based on different viewer characteristics&lt;/li&gt;
&lt;li&gt;Route requests to origins within a &lt;strong&gt;home region, based on a viewer's location&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/lambda/edge/" rel="noopener noreferrer"&gt;AWS Lambda@Edge Documentation&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS Global Accelerator
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;With Global Accelerator, you are provided &lt;strong&gt;two global static public IPs&lt;/strong&gt; that act as a fixed entry point to your application, &lt;strong&gt;improving availability&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;AWS Global Accelerator &lt;strong&gt;Reduce Internet latency&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Corporate proxies (On-Prem) can also whitelist your application's static IP addresses in their firewalls&lt;/li&gt;
&lt;li&gt;Provides static IP which we can bind in the on-prem firewall&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add or remove your AWS application endpoints, such as ALB, NLB, EC2 Instances&lt;/strong&gt;, and &lt;strong&gt;Elastic IPs&lt;/strong&gt; without making user-facing changes&lt;/li&gt;
&lt;li&gt;Real Time Messaging Protocol (&lt;strong&gt;RTMP&lt;/strong&gt;), deliver content over &lt;strong&gt;TCP&lt;/strong&gt; from across the globe&lt;/li&gt;
&lt;li&gt;AWS Global Accelerator also performs health checks automatically and route traffic to healthy endpoints&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  CloudFront Vs Global Accelerator
&lt;/h3&gt;

&lt;h4&gt;
  
  
  CloudFront
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTTP&lt;/strong&gt;, Cacheable &lt;strong&gt;TO&lt;/strong&gt; users over CDN&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Global Accelerator
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTTP&lt;/strong&gt;, and &lt;strong&gt;non-HTTP&lt;/strong&gt; such as &lt;strong&gt;TCP, UDP&lt;/strong&gt; (gaming), &lt;strong&gt;RTMP&lt;/strong&gt; (real time high video and audio), &lt;strong&gt;MQTT&lt;/strong&gt; (IoT), &lt;strong&gt;VoIP&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;From user location&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Amazon EC2
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Hibernation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You are &lt;strong&gt;not charged for Hibernated Instance usage&lt;/strong&gt;. You pay only for the EBS volumes and Elastic IP Addresses attached to it. There are no other hourly charges (just like any other stopped instance)&lt;/li&gt;
&lt;li&gt;To &lt;strong&gt;preserve contents of the instance's memory&lt;/strong&gt; whenever the instance is unavailable&lt;/li&gt;
&lt;li&gt;The EBS root volume is restored to its previous state&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;RAM contents are reloaded&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Spot Instances
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Cost-effective choice if your &lt;strong&gt;applications can be interrupted&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Examples: data analysis, batch jobs, background processing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Placement Groups
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;There is &lt;strong&gt;no charge&lt;/strong&gt; for creating a placement group&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cluster
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Packs &lt;strong&gt;instances close together inside an Availability Zone&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-latency&lt;/strong&gt; and &lt;strong&gt;high network performance&lt;/strong&gt; necessary for tightly-coupled &lt;strong&gt;node-to-node communication&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;High Performance Computing &lt;strong&gt;HPC applications&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Partition
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Groups of instances in one partition &lt;strong&gt;do not share the underlying hardware&lt;/strong&gt; with groups of instances in different partitions&lt;/li&gt;
&lt;li&gt;Used by &lt;strong&gt;large distributed and replicated workloads&lt;/strong&gt;, such as &lt;strong&gt;Hadoop, Cassandra, and Kafka&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Spread
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Strictly places a small group of instances across &lt;strong&gt;distinct underlying hardware&lt;/strong&gt; to reduce correlated failures&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Elastic Beanstalk
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ideal for simple web application, NOT ideal for micro services&lt;/li&gt;
&lt;li&gt;Supports Time Based scaling&lt;/li&gt;
&lt;li&gt;You can scale AWS Elastic Beanstalk environments on a defined schedule. Useful when you know the details around when issue is occurring&lt;/li&gt;
&lt;li&gt;Elastic Beanstalk &lt;strong&gt;automatically handles the deployment, from capacity provisioning, load balancing, auto-scaling to application health monitoring&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ECS - Elastic Container Service
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Auto Scaling can be triggered on ECS service based on &lt;strong&gt;ECS services CPU utilization&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;For Amazon ECS cluster, using the &lt;strong&gt;Fargate ECS task launch type&lt;/strong&gt;, use &lt;strong&gt;AWS Application Auto Scaling&lt;/strong&gt; with &lt;strong&gt;target tracking policies&lt;/strong&gt; to scale&lt;/li&gt;
&lt;li&gt;By default, &lt;strong&gt;Fargate tasks are spread across Availability Zones&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Elastic Load Balancers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  NLB (Network Load Balancer)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Operates at &lt;strong&gt;Layer 4&lt;/strong&gt;, TCP/UDP&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ultra-low latency&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Can &lt;strong&gt;handle tens of millions of requests per second&lt;/strong&gt; while &lt;strong&gt;maintaining high throughput&lt;/strong&gt; at ultra-low latency&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ALB (Application Load Balancer)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Operates at &lt;strong&gt;Layer 7&lt;/strong&gt;, HTTP, HTTPS&lt;/li&gt;
&lt;li&gt;You can create a &lt;strong&gt;listener rule on the ALB to redirect HTTP traffic to HTTPS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;ALB supports path-based routing (route the traffic to different target group based on the url/path)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Session Management
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Sticky Sessions or Session Affinity (local)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Route a site user to the &lt;strong&gt;particular web server&lt;/strong&gt; that is &lt;strong&gt;managing that individual user's session&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It's &lt;strong&gt;cost effective&lt;/strong&gt;, generally &lt;strong&gt;fast&lt;/strong&gt; because &lt;strong&gt;it eliminates network latency&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Drawbacks:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the event of &lt;strong&gt;node failure, session data is lost&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;If using &lt;strong&gt;ASG&lt;/strong&gt;, traffic may be &lt;strong&gt;unevenly distributed&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Distributed Session
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ElastiCache&lt;/strong&gt; for Redis, and ElastiCache for Memcached&lt;/li&gt;
&lt;li&gt;Provide a &lt;strong&gt;shared data storage for sessions&lt;/strong&gt; that can be accessible from any individual web server&lt;/li&gt;
&lt;li&gt;There is additional cost and network latency&lt;/li&gt;
&lt;li&gt;These are extremely fast and provide sub-millisecond latency&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can cache any data&lt;/strong&gt;, not just HTTP sessions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/caching/session-management/" rel="noopener noreferrer"&gt;AWS Session Management Documentation&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Auto Scaling Groups
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You can perform &lt;strong&gt;EC2 auto scaling based on SQS queue also&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Scheduled Scaling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Schedule according to predictable load changes&lt;/li&gt;
&lt;li&gt;Known holidays, known history&lt;/li&gt;
&lt;li&gt;Example: Every week the traffic to your web application &lt;strong&gt;starts to increase on Wednesday, remains high on Thursday, and starts to decrease on Friday&lt;/strong&gt;, you can configure a schedule for Amazon EC2 Auto Scaling to increase capacity on Wednesday and decrease capacity on Friday&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dynamic Scaling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Reactive in nature&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Target Tracking Scaling Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unpredictable workloads&lt;/strong&gt; and &lt;strong&gt;traffic spikes&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;To &lt;strong&gt;keep the average aggregate CPU utilization&lt;/strong&gt; of your Auto Scaling group at X percent&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Predictive Scaling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Regular patterns of traffic increases &lt;strong&gt;(business hours)&lt;/strong&gt; and applications that take a long time to initialize&lt;/li&gt;
&lt;li&gt;Potentially &lt;strong&gt;save you money on your EC2 bill&lt;/strong&gt; by helping you avoid the need to overprovision capacity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cyclical traffic&lt;/strong&gt;, such as high use of resources during regular business hours and low use of resources during evenings and weekends&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recurring on-and-off workload patterns&lt;/strong&gt;, such as batch processing, testing, or periodic data analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Applications that take a long time to initialize&lt;/strong&gt;, causing a noticeable latency impact on application performance during scale-out events&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Suspend-Resume Feature
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Temporarily pause scaling activities&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Useful when you are &lt;strong&gt;making a change or investigating a configuration issue&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  RDS
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;OLTP is RDS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RDS Storage Auto Scaling&lt;/strong&gt; &lt;strong&gt;automatically scales storage capacity&lt;/strong&gt; in response to growing database workloads, &lt;strong&gt;with zero downtime&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;AWS DMS&lt;/strong&gt;, you can &lt;strong&gt;migrate Oracle relational database&lt;/strong&gt; running in an on-premises data center &lt;strong&gt;to Amazon RDS&lt;/strong&gt; &lt;strong&gt;without modifying the application's code&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  RDS Read Replica
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read replica for read operation&lt;/strong&gt;, helps improve RDS overall performance (as reads are redirected to read replica)&lt;/li&gt;
&lt;li&gt;Read Replica &lt;strong&gt;support multi-region&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  When you create a read replica
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Amazon RDS &lt;strong&gt;takes a DB snapshot&lt;/strong&gt; of your source DB instance and begins replication&lt;/li&gt;
&lt;li&gt;If you create multiple read replicas only one snapshot is created at the start of the first create action&lt;/li&gt;
&lt;li&gt;You experience a &lt;strong&gt;brief I/O suspension on your source DB instance&lt;/strong&gt; while the DB snapshot occurs&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Points to consider for creating read replica
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;You &lt;strong&gt;must enable automatic backups on the source DB instance&lt;/strong&gt; by setting the &lt;strong&gt;backup retention period to a value other than 0&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-running transaction can slow the process&lt;/strong&gt; of creating the read replica&lt;/li&gt;
&lt;li&gt;AWS recommend that you &lt;strong&gt;wait for long-running transactions to complete&lt;/strong&gt; before creating a read replica&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  When to use Read Replica?
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;performance improvement&lt;/strong&gt; of RDS (note Multi-AZ is for DR)&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;internal systems request data&lt;/strong&gt; from the RDS DB instance&lt;/li&gt;
&lt;li&gt;Scaling beyond the compute or I/O capacity of a single DB instance for &lt;strong&gt;read-heavy database workloads&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Serving &lt;strong&gt;read traffic while the source DB instance is unavailable&lt;/strong&gt; (data on the read replica may be "stale")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Business reporting&lt;/strong&gt; or &lt;strong&gt;data warehousing scenarios&lt;/strong&gt;: You may want business reporting queries to run against a read replica rather than your primary, production DB Instance&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Additional RDS Notes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standby Instance are AZ specific&lt;/strong&gt;, &lt;strong&gt;read replicas can be over multiple regions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;AWS Secret Manager&lt;/strong&gt; to &lt;strong&gt;protect your RDS database&lt;/strong&gt; with password &lt;strong&gt;and automatic key rotation&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ElastiCache for Redis&lt;/strong&gt; to improve RDS DB instance &lt;strong&gt;speed/performance&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Gaming leaderboard, Top 10 players, real-time score update&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  To create an encrypted RDS from unencrypted RDS
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Take a Snapshot of the RDS instance&lt;/li&gt;
&lt;li&gt;Create an encrypted copy of the snapshot&lt;/li&gt;
&lt;li&gt;Restore the RDS instance from the encrypted snapshot&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Multi AZ RDS Deployment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;RPO less than 1 sec&lt;/li&gt;
&lt;li&gt;Multi AZ RDS deployment is limited to same region, &lt;strong&gt;Cross-Region Multi-AZ isn't supported&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  RDS HA and DR Metrics
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;RPO (approx)&lt;/th&gt;
&lt;th&gt;RTO (approx)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Amazon RDS Multi-AZ&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1-2 Minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read replica promotion (in-Region)&lt;/td&gt;
&lt;td&gt;Minutes&lt;/td&gt;
&lt;td&gt;&amp;lt; 5 Minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PITR (in-Region) using automated backups&lt;/td&gt;
&lt;td&gt;5 Minutes&lt;/td&gt;
&lt;td&gt;Minutes-Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PITR (cross-Region) using automated backups&lt;/td&gt;
&lt;td&gt;6-20 Minutes&lt;/td&gt;
&lt;td&gt;Minutes-Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Snapshot restore&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;td&gt;Minutes-Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html" rel="noopener noreferrer"&gt;AWS RDS Read Replicas Documentation&lt;/a&gt;&lt;br&gt;
&lt;a href="https://aws.amazon.com/rds/faqs/" rel="noopener noreferrer"&gt;AWS RDS FAQ&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS Aurora
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Multi-Region DB&lt;/li&gt;
&lt;li&gt;Multi-AZ DB, and read performance issue from secondary than Aurora is choice, &lt;strong&gt;read replication latency of less than one second&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Aurora &lt;strong&gt;Auto Scaling for the read replica&lt;/strong&gt;, helps with &lt;strong&gt;read replica latency issue&lt;/strong&gt; if any&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Aurora Global Database (DR Purpose of aurora)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Provides disaster recovery from region-wide outages, use for &lt;strong&gt;DR purpose between 2 different aws region&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Allows a single Amazon Aurora database to &lt;strong&gt;span multiple AWS regions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Replicates your data with no impact on database performance, enables fast local reads with low latency in each region&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RPO is 1 second&lt;/strong&gt; and &lt;strong&gt;RTO is less than 1 minute&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Aurora Serverless
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Automatically starts up, shuts down, and scales capacity up or down based on your application's needs&lt;/li&gt;
&lt;li&gt;Run your database in the cloud without managing any database capacity&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;create a database endpoint without specifying the DB instance class size&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Useful for infrequently accessed Database (For example, your database usage might be heavy for a short period of time, followed by long periods of light activity or no activity at all.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/rds/aurora/serverless/" rel="noopener noreferrer"&gt;AWS Aurora Serverless Documentation&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Aurora Read Replicas
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Useful to improve performance of primary DB of Amazon Aurora&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offload read workloads&lt;/strong&gt; from the primary DB instance&lt;/li&gt;
&lt;li&gt;Supports &lt;strong&gt;only read operations&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Each Aurora DB cluster can have &lt;strong&gt;up to 15 Aurora Replicas&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Maintain &lt;strong&gt;high availability&lt;/strong&gt; by locating Aurora Replicas in &lt;strong&gt;separate Availability Zones&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Aurora &lt;strong&gt;automatically fails over&lt;/strong&gt; to an Aurora Replica in case the primary DB instance becomes unavailable&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS RedShift
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data warehousing&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Both structured and unstructured&lt;/li&gt;
&lt;li&gt;Complex or &lt;strong&gt;complicated analytical queries and joins&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Amazon EMR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Perform &lt;strong&gt;Big Data analytics&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Big Data processing, examples: Apache Spark, Hive, Presto&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Lambda
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Max runtime 15min&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimal operational overhead expenditures&lt;/strong&gt; → Lambda (not EKS or EC2 or ECS)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  DynamoDB
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Can handle several &lt;strong&gt;million queries per second&lt;/strong&gt; at its peak and &lt;strong&gt;respond in milliseconds&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;User data in the form of &lt;strong&gt;JSON documents&lt;/strong&gt;, then it is DynamoDB (not RDS)&lt;/li&gt;
&lt;li&gt;Key-value store → DynamoDB&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;maximum item size&lt;/strong&gt; in DynamoDB is &lt;strong&gt;400 KB&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  On-Demand
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Your &lt;strong&gt;application traffic is difficult to predict (unpredictable) and control&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flash sale&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Your workload has &lt;strong&gt;large spikes of short duration&lt;/strong&gt;, or if your average table utilization is well below the peak&lt;/li&gt;
&lt;li&gt;New applications, or applications whose database &lt;strong&gt;workload is complex to forecast&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Developers working on &lt;strong&gt;serverless stacks with pay-per-use pricing&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;SaaS provider and independent software vendors (ISVs) who want the simplicity and resource isolation of deploying a table per subscriber&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  VPC Endpoints for DynamoDB
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Helps you to &lt;strong&gt;connect to DynamoDB within AWS network&lt;/strong&gt; (VPC)&lt;/li&gt;
&lt;li&gt;You need &lt;strong&gt;route table entry&lt;/strong&gt; created for the endpoint&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  DynamoDB Time to Live (TTL)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;TTL is useful if you &lt;strong&gt;store items that lose relevance (delete items) after a specific time&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Use cases:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Remove &lt;strong&gt;user or sensor data after one year of inactivity in an application&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Archive expired items&lt;/strong&gt; to an Amazon S3 data lake via Amazon DynamoDB Streams and AWS Lambda&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retain sensitive data for a certain amount of time&lt;/strong&gt; according to contractual or regulatory obligations&lt;/li&gt;
&lt;li&gt;Orders placed &lt;strong&gt;after one month will no longer be monitored&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Secondary Index
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Search item using more than one key: value&lt;/li&gt;
&lt;li&gt;Tracking ID, or customer ID, or order ID&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Minimal operational overhead expenditures&lt;/strong&gt; → DynamoDB (not RDS)&lt;/p&gt;

&lt;h3&gt;
  
  
  DynamoDB Accelerator (DAX)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Fully managed, highly available In-memory caching system used in front of DynamoDB&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance improvement&lt;/strong&gt; from &lt;strong&gt;milliseconds to microseconds&lt;/strong&gt; for DynamoDB&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  API Gateway
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RESTful&lt;/strong&gt; services, &lt;strong&gt;REST APIs&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimal operational overhead expenditures&lt;/strong&gt; → Lambda (not EKS or EC2 or ECS)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Serverless Microservices
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Minimal operational overhead expenditures&lt;/strong&gt; design serverless:&lt;/p&gt;

&lt;h3&gt;
  
  
  Frontend/Web Layer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;S3 with CloudFront static website hosting&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Application Layer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;API Gateway and AWS Lambda functions&lt;/li&gt;
&lt;li&gt;API Gateway, NLB and AWS Fargate&lt;/li&gt;
&lt;li&gt;ALB and AWS ECS&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  DB Layer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;DynamoDB → DB layer to store user data&lt;/li&gt;
&lt;li&gt;Aurora → DB layer to store user data&lt;/li&gt;
&lt;li&gt;ElastiCache → DB layer to store/cache user data&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  CloudWatch
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;To get &lt;strong&gt;Memory and disk related metric install cloudwatch agent&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Example: SwapUtilization&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;You can configure an Amazon &lt;strong&gt;CloudWatch alarm that triggers the recovery of the EC2 instance&lt;/strong&gt; if it becomes impaired (&lt;strong&gt;Instance check fails&lt;/strong&gt; only not system check fails)&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  CloudTrail
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;By &lt;strong&gt;default, only &lt;em&gt;Management events&lt;/em&gt; are logged&lt;/strong&gt; and &lt;strong&gt;not data events&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Additional charges apply for &lt;strong&gt;data&lt;/strong&gt; or &lt;strong&gt;Insights&lt;/strong&gt; events&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Protecting CloudTrail Logs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Log to a &lt;strong&gt;dedicated and centralized Amazon S3 bucket&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enable &lt;strong&gt;CloudTrail log file integrity&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/encrypting-cloudtrail-log-files-with-aws-kms.html" rel="noopener noreferrer"&gt;Encrypting CloudTrail log files with AWS KMS-managed keys (SSE-KMS)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-s3-bucket-policy-for-cloudtrail.html" rel="noopener noreferrer"&gt;Amazon S3 bucket policy for CloudTrail&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-sharing-logs.html" rel="noopener noreferrer"&gt;Sharing CloudTrail log files between AWS accounts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;By &lt;strong&gt;default&lt;/strong&gt;, the log files delivered by CloudTrail to your bucket are encrypted by &lt;strong&gt;SSE-S3&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;To provide a security layer that is directly manageable, you can instead use &lt;strong&gt;server-side encryption with AWS KMS-managed keys (SSE-KMS) for your CloudTrail&lt;/strong&gt; log files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/best-practices-security.html" rel="noopener noreferrer"&gt;CloudTrail Security Best Practices&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  To share CloudTrail log files between multiple AWS accounts
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create an &lt;strong&gt;IAM role&lt;/strong&gt; for each account that you want to share log files with&lt;/li&gt;
&lt;li&gt;For each of these IAM roles, create an &lt;strong&gt;access policy that grants read-only access&lt;/strong&gt; to the account you want to share the log files with&lt;/li&gt;
&lt;li&gt;Have an &lt;strong&gt;IAM user in each account programmatically assume the appropriate role&lt;/strong&gt; and retrieve the log files&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-sharing-logs.html" rel="noopener noreferrer"&gt;CloudTrail Log Sharing Documentation&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Route 53
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A Record
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A record value is &lt;strong&gt;always an IP address&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A record maps your website like example.com to IP address (ex: Elastic IP)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  CNAME
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;CNAME can never be an IP address&lt;/li&gt;
&lt;li&gt;CNAME record &lt;strong&gt;maps a name to another name&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;CNAME are for actual DNS servers, you &lt;strong&gt;can't create a CNAME record for example.com&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Example:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;An &lt;strong&gt;A&lt;/strong&gt; record for &lt;strong&gt;example.com&lt;/strong&gt; points to the server &lt;strong&gt;IP address&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;CNAME&lt;/strong&gt; record for &lt;strong&gt;&lt;a href="http://www.example.com" rel="noopener noreferrer"&gt;www.example.com&lt;/a&gt;&lt;/strong&gt; points to &lt;strong&gt;example.com&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Alias
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Alias record is an &lt;strong&gt;Amazon Route 53-specific&lt;/strong&gt; virtual record&lt;/li&gt;
&lt;li&gt;It &lt;strong&gt;works only with Amazon Route 53&lt;/strong&gt; (AWS specific resources)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  AWS specific resources:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;ELB&lt;/li&gt;
&lt;li&gt;CloudFront Distribution&lt;/li&gt;
&lt;li&gt;Elastic Beanstalk&lt;/li&gt;
&lt;li&gt;S3 static websites&lt;/li&gt;
&lt;li&gt;From &lt;strong&gt;one record&lt;/strong&gt; in a hosted zone &lt;strong&gt;to another record&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AAAA Record
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;AAAA record is similar to an A record but it is for &lt;strong&gt;IPv6 addresses&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  MX Record
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;MX records (Mail Exchange records) is used for setting up Email servers&lt;/li&gt;
&lt;li&gt;MX records must be mapped correctly to deliver email to your address&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; A &lt;strong&gt;CNAME can't be used for naked/root domain names&lt;/strong&gt;. &lt;strong&gt;Root domain names must be mapped with either an A record&lt;/strong&gt; &lt;strong&gt;or&lt;/strong&gt; &lt;strong&gt;an Alias record&lt;/strong&gt; (in Route 53).&lt;/p&gt;

&lt;h3&gt;
  
  
  Route 53 Routing Policies
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Simple Routing Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Route traffic to &lt;strong&gt;single resource&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Failover Routing Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Active-passive failover&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Latency Routing Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;You &lt;strong&gt;have resources in multiple AWS Regions&lt;/strong&gt; and you want to route traffic to the Region that provides the &lt;strong&gt;best latency&lt;/strong&gt; with less round-trip time&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Geolocation Routing Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Route traffic based on the &lt;strong&gt;location of your users&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Geoproximity Routing Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Route traffic based on the &lt;strong&gt;location of your resource&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shift traffic from resources in one location to resources in another&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Multivalue Answer Routing Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;You want &lt;strong&gt;Route 53 to respond to DNS queries&lt;/strong&gt; with up to &lt;strong&gt;eight healthy records&lt;/strong&gt; selected at random&lt;/li&gt;
&lt;li&gt;Return multiple values for a DNS query and &lt;strong&gt;route traffic to multiple IP addresses&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Associating a &lt;strong&gt;Route 53 health check with records&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Weighted Routing Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Route traffic to multiple resources in proportions (&lt;strong&gt;based on weight 30%, 60% etc&lt;/strong&gt;) that you specify&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.whizlabs.com/blog/dns-records/" rel="noopener noreferrer"&gt;DNS Records Reference&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  SQS
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decouple&lt;/strong&gt; your architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Standard Queues
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;At-least-once&lt;/strong&gt; message delivery&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplicate messages&lt;/strong&gt; can be delivered&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best effort&lt;/strong&gt; ordering&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better throughput&lt;/strong&gt; than FIFO&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  FIFO Queues
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exactly-once&lt;/strong&gt; processing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Duplicate&lt;/strong&gt; messages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FIFO&lt;/strong&gt; Order&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Low throughput&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SQS Temporary Queue Client
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Request-Response&lt;/strong&gt; method, &lt;strong&gt;short-lived&lt;/strong&gt;, &lt;strong&gt;lightweight messaging&lt;/strong&gt; destinations&lt;/li&gt;
&lt;li&gt;No intention to use SQS for long term&lt;/li&gt;
&lt;li&gt;Leverages virtual queues instead of creating/deleting SQS queues&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Additional SQS Notes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;SQS FIFO&lt;/strong&gt; for &lt;strong&gt;Asynchronously updates to database&lt;/strong&gt;, &lt;strong&gt;avoid dropping writes to the database&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Deduplication of messages can be enabled by:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Enable &lt;strong&gt;content-based deduplication&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Explicitly provide the &lt;strong&gt;message deduplication ID&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Priority:&lt;/strong&gt; Use &lt;strong&gt;separate queues (both can be standard Q) to provide prioritization&lt;/strong&gt; of work and &lt;strong&gt;EC2 to perform prioritization&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Amazon Kinesis
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Collect, process, and analyze &lt;strong&gt;real-time, streaming data&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time data&lt;/strong&gt; processing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clickstream data&lt;/strong&gt; processing&lt;/li&gt;
&lt;li&gt;It is fully managed, highly scalable&lt;/li&gt;
&lt;li&gt;Default retention is 24hrs, but can be extended to 7days (useful when the destination (S3) is not getting all the data from Kinesis)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Kinesis Video Streams
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Securely &lt;strong&gt;stream video&lt;/strong&gt; from connected devices to AWS for analytics, machine learning (ML), and other processing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Kinesis Data Streams
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-time data streaming service&lt;/strong&gt; that can continuously capture &lt;strong&gt;gigabytes of data per second&lt;/strong&gt; from hundreds of thousands of sources&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Kinesis Data Firehose
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Capture, transform, and load data streams&lt;/strong&gt; into AWS data stores for near real-time analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Amazon Kinesis Data Analytics
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Process data streams in real time with SQL or Apache Flink&lt;/strong&gt; without having to learn change existing code/application&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  SNS
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Fanout Scenario
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Message published (S3 event notification) to an SNS topic is replicated and pushed to multiple endpoints, such as &lt;strong&gt;Kinesis Data Firehose&lt;/strong&gt; delivery streams, Amazon &lt;strong&gt;SQS&lt;/strong&gt; queues, HTTP(S) endpoints, and &lt;strong&gt;Lambda&lt;/strong&gt; functions. This &lt;strong&gt;allows for parallel asynchronous processing&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example: Event-based strategy to run the &lt;strong&gt;multiple programs in parallel&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  SES
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Send &lt;strong&gt;mail from within any application&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Send email &lt;strong&gt;securely, globally, and at scale&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Use Cases
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Transactional&lt;/strong&gt; emails (&lt;strong&gt;purchase confirmations or password resets&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Marketing&lt;/strong&gt; emails (&lt;strong&gt;promotions, special offers and newsletters&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mass email&lt;/strong&gt; communications (&lt;strong&gt;notifications and announcements&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Secrets Manager
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Automatic Key Rotation possible&lt;/li&gt;
&lt;li&gt;Helps &lt;strong&gt;RDS database with password protection and automatic key rotation&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application on EC2&lt;/strong&gt;, or if &lt;strong&gt;Lambda function needs credentials to be retrieved&lt;/strong&gt; than best choice is AWS Secrets Manager&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Inspector
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Automated &lt;strong&gt;vulnerability management service&lt;/strong&gt; that &lt;strong&gt;continually scans EC2 and container workloads&lt;/strong&gt; for &lt;strong&gt;software vulnerabilities&lt;/strong&gt; and &lt;strong&gt;unintended network exposure&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS Inspector is specific to EC2&lt;/strong&gt; and &lt;strong&gt;Container workloads&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Provides Automated Security Assessments for EC2 instances&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Requires agent installation on EC2&lt;/strong&gt; for Host (vulnerability assessment/best practices) OR can do Network Assessment for EC2 without installing agent&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS GuardDuty
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Threat detection&lt;/strong&gt; service that &lt;strong&gt;continuously monitors your AWS accounts and workloads for malicious activity&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It uses Machine Learning, anomaly detection&lt;/li&gt;
&lt;li&gt;Can protect against Crypto Currency attacks&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Aim is to analyze logs:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CloudTrail Logs&lt;/strong&gt;: unusual API calls, unauthorized deployments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VPC Flow Logs&lt;/strong&gt;: unusual internal traffic, unusual IP address&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS Logs&lt;/strong&gt;: compromised EC2 instances sending encoded data within DNS queries&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Macie
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Macie helps identify and alert you to sensitive data, such &lt;strong&gt;as personally identifiable information (PII)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;AWS Macie is &lt;strong&gt;specific to S3&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS Shield
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Avoid DDoS Attacks&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AWS WAF
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AWS Web Application Firewall (WAF) &lt;strong&gt;protect web applications and APIs from attacks&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;AWS WAF is your &lt;strong&gt;first line of defense against web exploits&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use AWS WAF to &lt;strong&gt;protect your API Gateway APIs&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Protect from &lt;strong&gt;SQL injection, Cross-site scripting (XSS)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Protect &lt;strong&gt;against HTTP flooding attacks&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use AWS WAF to &lt;strong&gt;access or restrict from embargoed nation&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Important Notes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS WAF rules are evaluated before other access control features&lt;/strong&gt;, such as resource policies, IAM policies, Lambda authorizers, and Amazon Cognito authorizers&lt;/li&gt;
&lt;li&gt;WAF can be integrated with &lt;strong&gt;Application Load Balancer&lt;/strong&gt; (&lt;strong&gt;ALB&lt;/strong&gt;) (and NOT NLB)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  You can deploy AWS WAF on:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CloudFront&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Application Load Balancer&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API Gateway&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS AppSync&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-aws-waf.html" rel="noopener noreferrer"&gt;AWS WAF with API Gateway Documentation&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  VPC
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Expanding the VPC's IP Address Capacity
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It's &lt;strong&gt;NOT possible to change/modify the IP address range&lt;/strong&gt; &lt;strong&gt;of an&lt;/strong&gt; &lt;strong&gt;existing VPC or subnet&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  You can do one of the following:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add an additional IPv4 CIDR block as a secondary CIDR&lt;/strong&gt; to your VPC&lt;/li&gt;
&lt;li&gt;Create a new VPC with your preferred CIDR block and then migrate the resources from your old VPC to the new VPC (if applicable)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Additional Notes:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;You &lt;strong&gt;cannot disable IPv4 support for your VPC and subnet&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You &lt;strong&gt;can have both IPv4 and IPv6&lt;/strong&gt;, &lt;strong&gt;but not just IPv6&lt;/strong&gt; in your VPC&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  VPC Sharing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Allows multiple AWS accounts (within Same AWS Organization) to create their application resources, such as EC2, RDS, Redshift clusters, and Lambda functions, into shared, centrally-managed virtual private clouds (VPCs)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Use case:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;EC2 from "Test Account" want to access Redshift cluster in "Prod Account"&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  VPC Flow Logs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Capture information about the &lt;strong&gt;IP traffic going to and from network interfaces&lt;/strong&gt; in your VPC&lt;/li&gt;
&lt;li&gt;VPC Flow &lt;strong&gt;log data&lt;/strong&gt; can be &lt;strong&gt;published&lt;/strong&gt; to:

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Amazon CloudWatch Logs&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amazon S3&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Flow logs can be used for:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Monitoring the &lt;strong&gt;traffic that is reaching your instance&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnosing&lt;/strong&gt; overly restrictive &lt;strong&gt;security group rules&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Determining the direction of the &lt;strong&gt;traffic to and from the network interfaces&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  NAT Gateway
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;NAT Gateway is &lt;strong&gt;resilient within a single-AZ&lt;/strong&gt; (loss of AZ is loss of NAT Gateway)&lt;/li&gt;
&lt;li&gt;Must &lt;strong&gt;create multiple NAT Gateway in multiple AZ&lt;/strong&gt; for &lt;strong&gt;fault-tolerance&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Launched in Public subnet&lt;/strong&gt;, can be used by private instance to connect (routes need to be added) to internet&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Site-to-Site VPN Connections
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Site to site VPN connection can be &lt;strong&gt;established immediately&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Site to site VPN connection is &lt;strong&gt;cheaper&lt;/strong&gt; (compared to AWS Direct Connect)&lt;/li&gt;
&lt;li&gt;A single VPN tunnel still has a &lt;strong&gt;maximum throughput of 1.25 Gbps&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use AWS Transit Gateway to scale an AWS Site-to-Site VPN throughput&lt;/strong&gt; beyond a single IPsec tunnel's maximum limit of 1.25 Gbps limit&lt;/li&gt;
&lt;li&gt;To &lt;strong&gt;resolve slower VPN connection&lt;/strong&gt;, use a &lt;strong&gt;transit gateway&lt;/strong&gt; with &lt;strong&gt;equal cost multipath routing&lt;/strong&gt; and &lt;strong&gt;add additional VPN tunnels&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transit Gateway&lt;/strong&gt; enables you to &lt;strong&gt;scale the IPsec VPN throughput&lt;/strong&gt; with &lt;strong&gt;equal cost multi-path (ECMP) routing&lt;/strong&gt; support over &lt;strong&gt;multiple VPN tunnels&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/networking-and-content-delivery/scaling-vpn-throughput-using-aws-transit-gateway/" rel="noopener noreferrer"&gt;Scaling VPN Throughput with Transit Gateway&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS Direct Connect
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Data transfer pricing over Direct Connect is lower than data transfer pricing over the internet&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Maximum Resiliency (resiliency as much as possible) for critical or crucial Workloads
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Separate connections&lt;/strong&gt; terminating on separate devices in &lt;strong&gt;more than one location&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Resilience to:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Device failure&lt;/li&gt;
&lt;li&gt;Connectivity failure&lt;/li&gt;
&lt;li&gt;Complete location failure&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  High Resiliency for Critical Workloads
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;One connection at multiple locations&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Resilience to:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Device failure&lt;/li&gt;
&lt;li&gt;Connectivity failure due to a fiber cut&lt;/li&gt;
&lt;li&gt;Complete location failure&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/directconnect/resiliency-recommendation/" rel="noopener noreferrer"&gt;AWS Direct Connect Resiliency Recommendations&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/disaster-recovery-resiliency.html#failover" rel="noopener noreferrer"&gt;AWS Direct Connect Disaster Recovery&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Multiple VPC Connection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To connect multiple VPC (Prod, Dev, Test) with On-prem and avoid resource sharing among the connected devices create an &lt;strong&gt;AWS Direct Connect connection&lt;/strong&gt; and a &lt;strong&gt;VPN connection for each VPC&lt;/strong&gt; &lt;strong&gt;to connect back to the data center&lt;/strong&gt;. You cannot use Transit gateway here because you need to avoid resource sharing between VPC&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/premiumsupport/knowledge-center/transit-gateway-connect-vpcs-from-vpn/" rel="noopener noreferrer"&gt;Transit Gateway VPC Connection Documentation&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS Organizations
&lt;/h2&gt;

&lt;p&gt;You can use &lt;strong&gt;aws:PrincipalOrgID&lt;/strong&gt; condition key in your resource-based policies (S3 bucket policies) to more easily &lt;strong&gt;restrict access to IAM principals from accounts&lt;/strong&gt; in your AWS organization.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>saac03</category>
      <category>letuscloud</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Fri, 03 Jan 2025 06:15:02 +0000</pubDate>
      <link>https://dev.to/venkatesh111/-4m0a</link>
      <guid>https://dev.to/venkatesh111/-4m0a</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/venkatesh111" 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%2F876090%2Fe5631f88-585b-445b-8a42-66d8d2824ec9.png" alt="venkatesh111"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/venkatesh111/aws-quick-guide-amazon-s3-4pck" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;AWS Quick Guide - Amazon S3&lt;/h2&gt;
      &lt;h3&gt;Venkatesh K ・ Jan 1&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#aws&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#s3&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#letuscloud&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>aws</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>AWS Quick Guide - Amazon S3</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Wed, 01 Jan 2025 14:20:15 +0000</pubDate>
      <link>https://dev.to/venkatesh111/aws-quick-guide-amazon-s3-4pck</link>
      <guid>https://dev.to/venkatesh111/aws-quick-guide-amazon-s3-4pck</guid>
      <description>&lt;h2&gt;
  
  
  Amazon S3
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Key Concepts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Amazon S3 (Simple Storage Service) is an &lt;strong&gt;&lt;em&gt;object storage&lt;/em&gt;&lt;/strong&gt; service designed for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scalability&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High Availability&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Durability&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Buckets&lt;/strong&gt;: Containers for storing objects. Each bucket has a &lt;strong&gt;globally unique name&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Objects&lt;/strong&gt;: Files stored in S3, consisting of &lt;em&gt;data&lt;/em&gt;, &lt;em&gt;metadata&lt;/em&gt;, and a &lt;em&gt;unique key&lt;/em&gt; within the bucket.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;High Availability&lt;/strong&gt; &amp;amp; &lt;strong&gt;Durability&lt;/strong&gt;: S3 Objects are automatically stored across multiple devices spanning a minimum of three Availability Zones (S3 Standard, S3 Standard-IA, and S3 Glacier).&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Data Protection&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encryption at &lt;em&gt;rest&lt;/em&gt;:

&lt;ul&gt;
&lt;li&gt;Server-side encryption with Amazon S3 managed keys (&lt;strong&gt;SSE-S3&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;Server-side encryption with AWS Key Management Service keys (&lt;strong&gt;SSE-KMS&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;Dual-layer (two separate layers of encryption) server-side encryption with AWS Key Management Service keys (&lt;strong&gt;DSSE-KMS&lt;/strong&gt;).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Encryption in &lt;em&gt;transit&lt;/em&gt; (HTTPS).&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Storage Classes&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;S3 Standard&lt;/strong&gt;: Frequently accessed data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 Standard-IA&lt;/strong&gt;: Infrequently accessed data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 Intelligent-Tiering&lt;/strong&gt;: Automatically optimizes cost for infrequent data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 One Zone-IA&lt;/strong&gt;: Infrequently accessed data, stored in single AZ.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 Glacier Instant Retrieval&lt;/strong&gt;: Long-term archival data with instant retrieval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 Glacier Flexible Retrieval&lt;/strong&gt;: Long-term archival data with retrieval times in minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 Glacier Deep Archive&lt;/strong&gt;: Lowest-cost storage with retrieval times in hours.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Versioning&lt;/strong&gt;: Maintains multiple versions of objects to protect against accidental overwrites or deletions.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Access Control&lt;/strong&gt;: Managed through &lt;em&gt;Bucket Policies&lt;/em&gt;, &lt;em&gt;ACLs&lt;/em&gt;, and &lt;em&gt;IAM policies&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lifecycle Management&lt;/strong&gt;: Automates moving objects between storage classes or deletion.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-Region Replication (CRR)&lt;/strong&gt;: Automatically replicates data across AWS regions for disaster recovery.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Event Notifications&lt;/strong&gt;: Triggers actions when specific events occur, like object creation.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Object Lock&lt;/strong&gt;: Write-once-read-many (WORM) compliance to prevent object deletion.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multipart Upload&lt;/strong&gt;: Uploads large files in parts for efficiency and reliability.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon S3 Durability and Availability
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Durability
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Durability&lt;/strong&gt;: &lt;strong&gt;Sustainability/loss of Data&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;S3 offers high durability of &lt;strong&gt;&lt;em&gt;99.999999999&lt;/em&gt;&lt;/strong&gt; (or &lt;strong&gt;&lt;em&gt;11 9’s&lt;/em&gt;&lt;/strong&gt;) for objects across multiple Availability Zones.&lt;/li&gt;
&lt;li&gt;If you store 10,000,000 objects with Amazon S3, you can on average expect to incur a loss of a single object once every 10,000 years.&lt;/li&gt;
&lt;li&gt;11 9’s durability across all storage classes.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Availability
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Availability&lt;/strong&gt;: &lt;strong&gt;Accessibility to the Data&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;How readily the service is available?&lt;/li&gt;
&lt;li&gt;Amazon S3 Standard offers 99.99% availability.&lt;/li&gt;
&lt;li&gt;In a given year, S3 Standard may not be available for:

&lt;ul&gt;
&lt;li&gt;Yearly: 52m 35s&lt;/li&gt;
&lt;li&gt;Monthly: 4m 22s&lt;/li&gt;
&lt;li&gt;Weekly: 1m 0s&lt;/li&gt;
&lt;li&gt;Daily: 8s&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Availability varies from one storage class to another.&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon S3 Storage Classes:
&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%2Flu95ixjohb8b2l9lz0gw.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%2Flu95ixjohb8b2l9lz0gw.png" alt="Storage Classes" width="800" height="366"&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%2Ftbe670u37f9w4jbgma2x.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%2Ftbe670u37f9w4jbgma2x.png" alt="Storage Classes" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Amazon Storage Life Cycle Policies:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A lifecycle policy is a set of rules that define how objects in an S3 bucket should be:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Transitioned&lt;/em&gt;&lt;/strong&gt; between different storage classes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Expired&lt;/em&gt;&lt;/strong&gt; or deleted after a certain period.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Transitions allow you to automatically &lt;strong&gt;move objects between different S3 storage classes&lt;/strong&gt; as they age.&lt;/li&gt;
&lt;li&gt;This helps optimize storage costs by moving less frequently accessed data to cheaper storage tiers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Expirations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Expiration rules define when objects should be &lt;strong&gt;permanently deleted&lt;/strong&gt; from the bucket.&lt;/li&gt;
&lt;li&gt;This helps manage data retention and prevents unnecessary storage of outdated files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Common Use Cases
&lt;/h4&gt;

&lt;h5&gt;
  
  
  1. Archiving Old Data
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Move log files or backup data older than 30 days to cheaper storage classes.&lt;/li&gt;
&lt;li&gt;Automatically delete project archives after 7 years.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  2. Cost Optimization
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Transition infrequently accessed data to cheaper storage tiers.&lt;/li&gt;
&lt;li&gt;Remove temporary files or older versions of objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  3. Compliance and Retention
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Automatically delete sensitive documents after a specific retention period.&lt;/li&gt;
&lt;li&gt;Ensure compliance with data retention policies.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;S3 supports waterfall model for transitioning objects between storage classes.&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%2Fwy7zl279u336sybl7xt1.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%2Fwy7zl279u336sybl7xt1.png" alt="alt text" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon S3 Security
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Identity-Based Policies&lt;/strong&gt;: Define &lt;em&gt;what&lt;/em&gt; actions a user/group/role can perform.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&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="w"&gt;
                &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                        &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                        &lt;/span&gt;&lt;span class="nl"&gt;"Action"&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="w"&gt;
                                &lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                                &lt;/span&gt;&lt;span class="s2"&gt;"s3:PutObject"&lt;/span&gt;&lt;span class="w"&gt;
                        &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
                        &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::venkatesh-bucket/*"&lt;/span&gt;&lt;span class="w"&gt;
                &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="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Resource-Based Policies&lt;/strong&gt;: Define &lt;em&gt;who&lt;/em&gt; (&lt;em&gt;Principal&lt;/em&gt;) can perform actions such as allow or deny.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&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="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"Sid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PublicRead"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::venkatesh-bucket/public/*"&lt;/span&gt;&lt;span class="w"&gt;
            &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="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Access Control List (ACL)&lt;/strong&gt;: Fine-grained control over individual objects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Block Public Access&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Block Public Access is applicable to only Public/Anonymous access.&lt;/li&gt;
&lt;li&gt;Block public access settings &lt;strong&gt;can override ACLs and bucket policies&lt;/strong&gt; public access.&lt;/li&gt;
&lt;li&gt;You can apply block public access settings to:

&lt;ul&gt;
&lt;li&gt;Individual buckets or to&lt;/li&gt;
&lt;li&gt;All buckets in your account.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&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%2F4363c5nbsjc7yyubx0ym.png" alt="Block Public Access" width="800" height="458"&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Presigned URLs&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allows you to share objects or allow users to upload objects to buckets without AWS security credentials or permissions.&lt;/li&gt;
&lt;li&gt;Shared URLs use logged-in user credentials (but in a secure way) to access objects.&lt;/li&gt;
&lt;li&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%2Fa9px8ixaqmlefjaqtnmm.png" alt="Presigned URLs" width="800" height="320"&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Identity-Based Policies Vs Resource-Based Policies Vs ACLs
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Identity-Based Policies&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Resource-Based Policies&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Access Control List (ACL)&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Attachment&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Attached to &lt;em&gt;Users/Groups/Roles&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;Attached to &lt;em&gt;buckets&lt;/em&gt; and applicable at the bucket level&lt;/td&gt;
&lt;td&gt;Attached to both buckets and individual objects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Define &lt;em&gt;what&lt;/em&gt; actions a user/group/role can perform&lt;/td&gt;
&lt;td&gt;Define &lt;em&gt;who&lt;/em&gt; can perform actions such as allow or deny&lt;/td&gt;
&lt;td&gt;Fine-grained control over individual objects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scope&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Identity-level permissions&lt;/td&gt;
&lt;td&gt;Bucket-level permissions&lt;/td&gt;
&lt;td&gt;Bucket and object-level permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Limitations&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;You can't have a bucket policy for individual objects&lt;/td&gt;
&lt;td&gt;ACLs are legacy, and AWS suggests using IAM policies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best Use Case&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Control user, group, or role actions within the AWS environment&lt;/td&gt;
&lt;td&gt;Enable cross-account access or restrict access to specific IP ranges, services, or accounts&lt;/td&gt;
&lt;td&gt;Provide quick and specific permissions for individual objects (if legacy usage or fine-grained permissions needed)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Amazon S3 Replication
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Automatic, &lt;strong&gt;&lt;em&gt;asynchronous&lt;/em&gt; copying of objects across Amazon S3 buckets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;S3 Objects &lt;strong&gt;can be configured to replicate across multiple destination buckets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You &lt;strong&gt;can change the storage class&lt;/strong&gt; of replicated S3 objects when performing replication.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Replication options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Across AWS Regions (CRR).&lt;/li&gt;
&lt;li&gt;Within the Same AWS Region (SRR).&lt;/li&gt;
&lt;li&gt;Across AWS accounts.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Replication configurations are &lt;strong&gt;configured at SOURCE bucket&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Versioning Must be enabled on BOTH&lt;/strong&gt; source and destination buckets.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Specify Destination Bucket.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;IAM Role&lt;/strong&gt; that the S3 bucket should assume to replicate objects.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;You can optionally change destination storage class.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Replication &lt;strong&gt;only supports copying new S3 objects&lt;/strong&gt; after it is enabled.&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%2Fe9hkjoi8r5h2326qqhgj.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%2Fe9hkjoi8r5h2326qqhgj.png" alt="S3 Replication" width="800" height="287"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon S3 Encryption
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Encryption at Rest&lt;/strong&gt;: Server-side encryption with Amazon S3 managed keys (SSE-S3).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encryption in Transit&lt;/strong&gt;: Server-side encryption with AWS Key Management Service keys (SSE-KMS).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual-layer Encryption&lt;/strong&gt;: Dual-layer (two separate layers of encryption) server-side encryption with AWS Key Management Service keys (DSSE-KMS).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Encryption by Default&lt;/strong&gt;: Server-side encryption is enabled by default for new buckets.&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%2Fcv8datfe599remdbjz27.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%2Fcv8datfe599remdbjz27.png" alt="S3 Encryption" width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon S3 Event Notifications
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You can configure S3 to send notifications when certain events occur, such as object creation, deletion, or modification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Object Created&lt;/strong&gt;: Triggered when an object is created in a bucket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Object Deleted&lt;/strong&gt;: Triggered when an object is deleted from a bucket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Object Modified&lt;/strong&gt;: Triggered when an object is modified in a bucket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Destination Includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SNS&lt;/strong&gt;: Fan-out messages to systems for parallel processing or directly to people.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQS&lt;/strong&gt;: Send notifications to an SQS queue to be read by a server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lambda&lt;/strong&gt;: Run a Lambda function script based on S3 events.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon S3 Access Points
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AWS S3 Access Points &lt;strong&gt;solve the complexity of managing bucket policies for multiple teams and applications by creating separate access points with individualized policies for each team or use case&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Traditional S3 bucket policies become difficult to manage as more teams and applications are added, leading to complex, hard-to-audit policies with limited size and flexibility.&lt;/li&gt;
&lt;li&gt;Create a &lt;strong&gt;separate S3 access point for every user or application&lt;/strong&gt; that needs access to S3 bucket.&lt;/li&gt;
&lt;li&gt;You can use &lt;strong&gt;access points to control access to buckets, objects&lt;/strong&gt; (folders), or both.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With S3 Access Points, organizations can create multiple access points for a single bucket, each with its own unique properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Unique S3 URI&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Specific Access Point ARN&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customizable access policy&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network origin control&lt;/strong&gt; (internet or VPC-specific)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Access Points &lt;strong&gt;allow granular folder-level access control&lt;/strong&gt;, enabling different teams to access specific folders within the same S3 bucket while maintaining strict access boundaries.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Network origin&lt;/strong&gt; features let you restrict access points to specific VPCs or make them publicly accessible, providing enhanced security and network segmentation.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;To use Access Points effectively, &lt;strong&gt;both the Access Point policy and the underlying bucket policy must permit the requested action&lt;/strong&gt;, with a recommended &lt;strong&gt;bucket policy that delegates access control to the Access Points&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Deny policies can be implemented at both the Access Point and bucket levels to provide additional security, such as preventing object deletion in specific folders or restricting direct bucket access.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Amazon S3 Access Points Best Practices:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Granting minimal necessary permissions.&lt;/li&gt;
&lt;li&gt;Using Access Point ARNs in IAM policies.&lt;/li&gt;
&lt;li&gt;Delegating access control to Access Points through bucket policies.&lt;/li&gt;
&lt;li&gt;Leveraging Access Points for scalable and manageable S3 access control.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon S3 Multi-Region Access Points
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Multi-region Access Points enable you to create a single access point that spans multiple AWS Regions, providing a unified view of data across all Regions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-region Access Points&lt;/strong&gt; are useful for &lt;strong&gt;cross-Region replication&lt;/strong&gt; and &lt;strong&gt;cross-Region data access&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;With Multi-region Access Points, you can &lt;strong&gt;access data across multiple AWS Regions&lt;/strong&gt; using a single URL, ensuring data consistency and reducing the risk of data loss or corruption.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/s3/" rel="noopener noreferrer"&gt;Amazon S3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html" rel="noopener noreferrer"&gt;Amazon S3 Access Points&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html" rel="noopener noreferrer"&gt;Amazon S3 Replication&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-encryption.html" rel="noopener noreferrer"&gt;Amazon S3 Encryption&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/event-notifications.html" rel="noopener noreferrer"&gt;Amazon S3 Event Notifications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html#access-points-best-practices" rel="noopener noreferrer"&gt;Amazon S3 Access Points Best Practices&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>s3</category>
      <category>letuscloud</category>
    </item>
    <item>
      <title>Amazon EC2 Auto Scaling</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Tue, 01 Oct 2024 06:37:25 +0000</pubDate>
      <link>https://dev.to/venkatesh111/amazon-ec2-auto-scaling-3o6o</link>
      <guid>https://dev.to/venkatesh111/amazon-ec2-auto-scaling-3o6o</guid>
      <description>&lt;h1&gt;
  
  
  Amazon EC2 Auto Scaling
&lt;/h1&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%2Fz5fc448oskjkgj520sqo.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%2Fz5fc448oskjkgj520sqo.png" alt="ASG" width="800" height="512"&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%2F2678ka4uu1be8lnjqzf6.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%2F2678ka4uu1be8lnjqzf6.png" alt="ASG" width="458" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Auto Scaling Groups (ASG)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An Auto Scaling Group is a &lt;strong&gt;collection of EC2 instances&lt;/strong&gt; that are treated as a &lt;strong&gt;logical grouping&lt;/strong&gt; for the purposes of &lt;strong&gt;automatic scaling and management&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;ASG helps you automatically manage the scaling(in/out) of EC2 instances to meet the dynamic workload of your applications&lt;/li&gt;
&lt;li&gt;ASG are &lt;strong&gt;&lt;em&gt;&lt;code&gt;horizontal&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt; (increase or decrease in EC2 instance Count) Scaling&lt;/li&gt;
&lt;li&gt;There are &lt;strong&gt;no additional fees&lt;/strong&gt; with Amazon EC2 Auto Scaling, You only pay for the AWS resources (for example, EC2 instances, EBS volumes, and CloudWatch alarms) that you use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Advantages of ASG
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Fault tolerance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon EC2 Auto Scaling &lt;strong&gt;can detect when an instance is unhealthy, terminate it, and launch an instance to replace it&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You can also configure Amazon EC2 Auto Scaling to &lt;strong&gt;use multiple Availability Zones&lt;/strong&gt;. If one Availability Zone becomes unavailable, Amazon EC2 Auto Scaling can launch instances in another one to compensate.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;High Availability&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ASG helps ensure that your application &lt;strong&gt;always has the right amount of capacity to handle the current traffic demand&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Better Cost Management&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon EC2 Auto Scaling can dynamically increase and decrease capacity as needed. &lt;/li&gt;
&lt;li&gt;You pay for the EC2 instances you use, you save money by launching instances when they are needed and terminating them when they aren't.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing for Amazon EC2 Auto Scaling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;There are &lt;strong&gt;no additional fees with Amazon EC2 Auto Scaling&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;You only pay for the AWS resources (for example, EC2 instances, EBS volumes, and CloudWatch alarms) that you use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Understanding the Need for Amazon EC2 Auto Scaling
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Variable demand
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Consider a basic web application running on AWS.&lt;/li&gt;
&lt;li&gt;Purpose: Allows employees to search for conference rooms for meetings.&lt;/li&gt;
&lt;li&gt;Usage pattern:

&lt;ul&gt;
&lt;li&gt;Minimal usage at the beginning and end of the week.&lt;/li&gt;
&lt;li&gt;Increased usage in the middle of the week as more employees schedule meetings.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Graph below Displays the application’s capacity usage over the course of a week.&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%2Fbaxqmlo66wkawqe64501.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%2Fbaxqmlo66wkawqe64501.png" alt="Variable demand" width="687" height="294"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Traditional Capacity Planning Options:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Option 1: Add Enough Servers to Always Meet Demand&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%2F1ws7al0vwaqx843c8wd9.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%2F1ws7al0vwaqx843c8wd9.png" alt="Option 1" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensures sufficient capacity at all times.&lt;/li&gt;
&lt;li&gt;Downside: Extra capacity remains unused on low-demand days, &lt;strong&gt;increasing costs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Example: Inefficiency of buying more capacity than needed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Option 2: Handle Average Demand&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%2Fymv8o662js2zz3set5gw.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%2Fymv8o662js2zz3set5gw.png" alt="Option 2" width="682" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Less expensive as it avoids purchasing rarely used equipment.&lt;/li&gt;
&lt;li&gt;Downside: Risk of &lt;strong&gt;poor customer experience&lt;/strong&gt; when demand exceeds capacity.&lt;/li&gt;
&lt;li&gt;Example: Poor customer experience due to insufficient capacity.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Amazon EC2 Auto Scaling:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Option 3: Dynamic Scaling&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%2F54joxc680lf5ddww4fl6.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%2F54joxc680lf5ddww4fl6.png" alt="Option 3" width="680" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adds &lt;strong&gt;new instances only when necessary&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminates instances when no longer needed&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost-effective&lt;/strong&gt;: Pay only for the instances used.&lt;/li&gt;
&lt;li&gt;Provides the &lt;strong&gt;best customer experience&lt;/strong&gt; while minimizing expenses.&lt;/li&gt;
&lt;li&gt;Example: Adjusting capacity as needed with Amazon EC2 Auto Scaling.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Balancing capacity across Availability Zones
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The following image shows an overview of multi-tier architecture deployed across three Availability Zones.&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%2Fz5fc448oskjkgj520sqo.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%2Fz5fc448oskjkgj520sqo.png" alt="ASG multi AZ" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instance Distribution:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Amazon EC2 Auto Scaling aims to &lt;strong&gt;maintain equivalent numbers of instances in each enabled Availability Zone&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It attempts to launch new instances in the Availability Zone with the fewest instances.&lt;/li&gt;
&lt;li&gt;If multiple subnets are chosen for the Availability Zone, a subnet is selected at random.&lt;/li&gt;
&lt;li&gt;If the launch attempt fails, it tries to launch instances in another Availability Zone until successful.&lt;/li&gt;
&lt;li&gt;In cases where an Availability Zone becomes unhealthy or unavailable:&lt;/li&gt;
&lt;li&gt;Instance distribution may become uneven across Availability Zones.&lt;/li&gt;
&lt;li&gt;Upon recovery, Amazon EC2 Auto Scaling re-balances the Auto Scaling group.&lt;/li&gt;
&lt;li&gt;It launches instances in the enabled Availability Zones with the fewest instances and terminates instances elsewhere.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amazon EC2 Auto Scaling instance lifecycle
&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%2F50mixwbglz99myl1tmrl.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%2F50mixwbglz99myl1tmrl.png" alt="ASG Lifecycle" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start&lt;/strong&gt;: The beginning of the instance lifecycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pending&lt;/strong&gt;: The instance is preparing to enter service.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pending:Wait&lt;/strong&gt;: A lifecycle hook where custom actions can be performed before the instance becomes active.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pending:Proceed&lt;/strong&gt;: The instance proceeds to the next state after the custom actions are completed.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;InService&lt;/strong&gt;: The instance is now serving traffic.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User puts instance into Standby&lt;/strong&gt;: The instance is manually moved to Standby state.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Standby&lt;/strong&gt;: The instance is not serving traffic but is still part of the Auto Scaling group.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User returns instance to service&lt;/strong&gt;: The instance is manually moved back to InService state.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Terminating&lt;/strong&gt;: The instance is in the process of being shut down.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Terminating:Wait&lt;/strong&gt;: A lifecycle hook where custom actions can be performed before the instance is terminated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminating:Proceed&lt;/strong&gt;: The instance proceeds to termination after the custom actions are completed.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Terminated&lt;/strong&gt;: The instance has been shut down and removed from service.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Detaching&lt;/strong&gt;: The instance is being detached from the Auto Scaling group.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Detached&lt;/strong&gt;: The instance has been successfully detached from the Auto Scaling group but not terminated.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;End&lt;/strong&gt;: The lifecycle of the instance has concluded.&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Scale out, &lt;code&gt;InService&lt;/code&gt;, Scale in
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scale out
&lt;/h3&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%2F4ne1fm6ztj6c9t4lgsdy.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%2F4ne1fm6ztj6c9t4lgsdy.png" alt="ScaleOut" width="800" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Scale-Out Events&lt;/strong&gt;: Direct Auto Scaling group to launch and attach EC2 instances.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manual Increase&lt;/strong&gt;: Manually increase the size of the group.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaling Policy&lt;/strong&gt;: Automatically increase the size based on demand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scheduled Scaling&lt;/strong&gt;: Increase the size at a specific time.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Scale-Out Process&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto Scaling group launches required EC2 instances using the launch template.&lt;/li&gt;
&lt;li&gt;Instances start in Pending state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lifecycle Hook&lt;/strong&gt;: Perform custom actions if added.&lt;/li&gt;
&lt;li&gt;Instances fully configured and pass Amazon EC2 health checks.&lt;/li&gt;
&lt;li&gt;Instances attach to Auto Scaling group and enter &lt;code&gt;InService&lt;/code&gt; state.&lt;/li&gt;
&lt;li&gt;Counted against desired capacity of the Auto Scaling group.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Load Balancer Integration&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If configured to receive traffic from an Elastic Load Balancing load balancer:&lt;/li&gt;
&lt;li&gt;Auto Scaling automatically registers the instance with the load balancer.&lt;/li&gt;
&lt;li&gt;Instance marked as &lt;code&gt;InService&lt;/code&gt; after registration.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Instances in Service, &lt;code&gt;InService&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Instances remain in the &lt;strong&gt;&lt;code&gt;InService&lt;/code&gt;&lt;/strong&gt; state until one of the following occurs:

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scale-In Event&lt;/strong&gt;: A scale-in event occurs, and Amazon EC2 Auto Scaling chooses to terminate this instance to reduce the size of the Auto Scaling group.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standby State&lt;/strong&gt;: You put the instance into a Standby state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detach Instance&lt;/strong&gt;: You detach the instance from the Auto Scaling group.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Health Check Failure&lt;/strong&gt;: The instance fails a required number of health checks, so it is removed from the Auto Scaling group, terminated, and replaced.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Scale in
&lt;/h3&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%2F1212x9h1ublolumccdc5.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%2F1212x9h1ublolumccdc5.png" alt="ScaleIn" width="800" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Scale-In Events&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Direct Auto Scaling Group&lt;/strong&gt;: Detach and terminate EC2 instances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual Decrease&lt;/strong&gt;: Manually reduce the group size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaling Policy&lt;/strong&gt;: Automatically reduce the group size based on demand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scheduled Scaling&lt;/strong&gt;: Reduce the group size at a specific time.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Scale-In Process&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instance Termination&lt;/strong&gt;: Auto Scaling group terminates instances using its termination policy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminating State&lt;/strong&gt;: Instances enter the Terminating state and can't be put back into service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lifecycle Hook&lt;/strong&gt;: Perform custom actions on terminating instances if added.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complete Termination&lt;/strong&gt;: Instances are fully terminated and enter the Terminated state.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Load Balancer Integration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;De-registration&lt;/strong&gt;: If using an Elastic Load Balancing load balancer, Auto Scaling automatically de-registers terminating instances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request Redirection&lt;/strong&gt;: New requests are redirected to other instances, while existing connections continue until the de-registration delay expires.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Launch Templates
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Launch Templates are &lt;strong&gt;instance configuration template&lt;/strong&gt; that an Auto Scaling group uses to launch EC2 instances&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Launch templates are similar to launch configurations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Key components of launch templates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AMI ID&lt;/li&gt;
&lt;li&gt;Instance type&lt;/li&gt;
&lt;li&gt;Key pair&lt;/li&gt;
&lt;li&gt;Security groups&lt;/li&gt;
&lt;li&gt;Other EC2 instance parameters&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Advantages over launch configurations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for multiple versions&lt;/li&gt;
&lt;li&gt;Ability to create subsets of parameters&lt;/li&gt;
&lt;li&gt;Reusability across versions&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Versioning benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can create a base configuration without AMI or user data&lt;/li&gt;
&lt;li&gt;Add specific AMI and user data in new versions&lt;/li&gt;
&lt;li&gt;Maintain general configuration parameters separately&lt;/li&gt;
&lt;li&gt;Delete testing versions when no longer needed&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Recommended over launch configurations for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access to latest features and improvements&lt;/li&gt;
&lt;li&gt;Support for advanced features like:&lt;/li&gt;
&lt;li&gt;Mixed Spot and On-Demand Instances&lt;/li&gt;
&lt;li&gt;Multiple instance types in one Auto Scaling group&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Compatible with newer EC2 features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Systems Manager parameters (AMI ID)&lt;/li&gt;
&lt;li&gt;Current generation EBS Provisioned IOPS volumes (io2)&lt;/li&gt;
&lt;li&gt;EBS volume tagging&lt;/li&gt;
&lt;li&gt;T2 Unlimited instances&lt;/li&gt;
&lt;li&gt;Capacity Reservations&lt;/li&gt;
&lt;li&gt;Capacity Blocks&lt;/li&gt;
&lt;li&gt;Dedicated Hosts&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Template creation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All parameters are optional&lt;/li&gt;
&lt;li&gt;Without an AMI specified, you can't add one when creating the Auto Scaling group&lt;/li&gt;
&lt;li&gt;If AMI is specified but no instance type, you can add instance types when creating the group&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Launch Template Versioning
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The diagram below shows a single launch template with three versions:&lt;/li&gt;
&lt;li&gt;Each version can add or modify parameters&lt;/li&gt;
&lt;li&gt;Default version (Version 2 in this case) is used unless another version is specified&lt;/li&gt;
&lt;li&gt;Allows for flexible configurations within a single launch template&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%2F2faol17l4wpuu0ke6nrp.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%2F2faol17l4wpuu0ke6nrp.png" alt="Launch Template Versioning" width="745" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Version 1
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Includes:

&lt;ul&gt;
&lt;li&gt;t2.micro instance type&lt;/li&gt;
&lt;li&gt;ami-1a2b&lt;/li&gt;
&lt;li&gt;subnet-1111&lt;/li&gt;
&lt;li&gt;key-pair-1&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Basic configuration without security group&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Version 2 (Default)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Builds on Version 1&lt;/li&gt;
&lt;li&gt;Adds:

&lt;ul&gt;
&lt;li&gt;sg-2222 (security group)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Set as the default version&lt;/li&gt;

&lt;li&gt;Will be used if no specific version is requested when launching an instance&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Version 3
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Changes some parameters from previous versions&lt;/li&gt;
&lt;li&gt;Uses:

&lt;ul&gt;
&lt;li&gt;t2.medium instance type&lt;/li&gt;
&lt;li&gt;ami-3c4d&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Keeps:

&lt;ul&gt;
&lt;li&gt;subnet-1111&lt;/li&gt;
&lt;li&gt;key-pair-1 from Version 1&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Adds:

&lt;ul&gt;
&lt;li&gt;sg-3333 (different security group from Version 2)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Launch Templates Vs Launch Configuration
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Launch Template&lt;/th&gt;
&lt;th&gt;Launch Configuration&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;State&lt;/td&gt;
&lt;td&gt;Newer and more flexible&lt;/td&gt;
&lt;td&gt;Older and less flexible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modification&lt;/td&gt;
&lt;td&gt;Can be modified after creation&lt;/td&gt;
&lt;td&gt;Cannot be modified once created&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Versioning&lt;/td&gt;
&lt;td&gt;Supports versioning&lt;/td&gt;
&lt;td&gt;Does not support versioning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use Cases&lt;/td&gt;
&lt;td&gt;EC2 instances, Spot Fleets, and ASGs&lt;/td&gt;
&lt;td&gt;Only ASGs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Configuration Changes&lt;/td&gt;
&lt;td&gt;Allows partial changes&lt;/td&gt;
&lt;td&gt;Requires full configuration for changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Instance Types&lt;/td&gt;
&lt;td&gt;Supports multiple instance types&lt;/td&gt;
&lt;td&gt;Limited to a single instance type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AMI and Instance Type&lt;/td&gt;
&lt;td&gt;Can be specified at launch time&lt;/td&gt;
&lt;td&gt;Must be specified when creating&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AWS Recommendation&lt;/td&gt;
&lt;td&gt;Recommended for new deployments&lt;/td&gt;
&lt;td&gt;Legacy option&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flexibility&lt;/td&gt;
&lt;td&gt;More flexible and versatile&lt;/td&gt;
&lt;td&gt;Less flexible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Updates&lt;/td&gt;
&lt;td&gt;Can be updated&lt;/td&gt;
&lt;td&gt;Cannot be updated, must create new&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  ASG LifeCycle hooks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Lifecycle hooks are like a &lt;strong&gt;&lt;em&gt;&lt;code&gt;pause&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt; button in Amazon EC2 Auto Scaling activity&lt;/li&gt;
&lt;li&gt;Lifecycle hooks puts instances into a &lt;strong&gt;&lt;code&gt;wait state&lt;/code&gt; to perform custom actions&lt;/strong&gt; during launch or before termination.&lt;/li&gt;
&lt;li&gt;Instances remain in a wait state until the lifecycle action is completed or the timeout period ends.&lt;/li&gt;
&lt;li&gt;default Timeout: 1 hour&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Launch (Scale-Out) Hook&lt;/strong&gt;: &lt;strong&gt;Installing software&lt;/strong&gt;, &lt;strong&gt;run scripts&lt;/strong&gt;,  or &lt;strong&gt;configuring the instance&lt;/strong&gt; before an instance goes into service.

&lt;ul&gt;
&lt;li&gt;Newly launched instance enters a wait state after startup&lt;/li&gt;
&lt;li&gt;Run scripts to download and install necessary software&lt;/li&gt;
&lt;li&gt;Ensure instance is fully ready before receiving traffic&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;complete-lifecycle-action&lt;/code&gt; command to continue&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Terminate (Scale-In) Hook&lt;/strong&gt;: &lt;strong&gt;Downloading logs&lt;/strong&gt;, &lt;strong&gt;backup data&lt;/strong&gt;, or perform any &lt;strong&gt;clean-up tasks&lt;/strong&gt; before an instance is terminated.

&lt;ul&gt;
&lt;li&gt;Instance pauses before termination&lt;/li&gt;
&lt;li&gt;Send notification via Amazon EventBridge&lt;/li&gt;
&lt;li&gt;Allows actions like invoking AWS Lambda functions or connecting to the instance&lt;/li&gt;
&lt;li&gt;Opportunity to download logs or other data before full termination&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Controlling instance registration with Elastic Load Balancing&lt;/li&gt;
&lt;li&gt;Ensuring bootstrap scripts complete successfully&lt;/li&gt;
&lt;li&gt;Verifying applications are ready to accept traffic&lt;/li&gt;
&lt;li&gt;Registering instances to the load balancer after lifecycle hook completion&lt;/li&gt;
&lt;/ul&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%2F1vh9ei5wq21zqzul0mlz.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%2F1vh9ei5wq21zqzul0mlz.png" alt="LifeCycle hooks" width="695" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Scale-Out Event&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instances launch and start in &lt;strong&gt;Pending&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;autoscaling:EC2_INSTANCE_LAUNCHING&lt;/code&gt; hook:&lt;/li&gt;
&lt;li&gt;Move to &lt;strong&gt;Pending:Wait&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Complete lifecycle action.&lt;/li&gt;
&lt;li&gt;Move to &lt;strong&gt;Pending:Proceed&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Fully configured instances attach to Auto Scaling group and enter &lt;strong&gt;InService&lt;/strong&gt; state.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Scale-In Event&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instances terminate and detach from Auto Scaling group, entering &lt;strong&gt;Terminating&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;autoscaling:EC2_INSTANCE_TERMINATING&lt;/code&gt; hook:&lt;/li&gt;
&lt;li&gt;Move to &lt;strong&gt;Terminating:Wait&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Complete lifecycle action.&lt;/li&gt;
&lt;li&gt;Move to &lt;strong&gt;Terminating:Proceed&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Fully terminated instances enter &lt;strong&gt;Terminated&lt;/strong&gt; state.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  ASG Warm Pool
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;warm pool&lt;/em&gt; helps to &lt;strong&gt;decreases latency for applications with long boot times&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;warm pool&lt;/em&gt; &lt;strong&gt;ensures instances are ready to quickly start serving application traffic during a scale-out event&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Instances in the warm pool count toward the desired capacity when they leave the pool (known as a warm start).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Instance States&lt;/strong&gt;: Instances in the warm pool can be in one of three states: Stopped, Running, or Hibernated.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stopped&lt;/strong&gt;: Minimizes costs, pay only for volumes and Elastic IP addresses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hibernated&lt;/strong&gt;: Saves RAM contents to Amazon EBS root volume, pay for EBS volumes and Elastic IP addresses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Running&lt;/strong&gt;: Discouraged to avoid unnecessary charges.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Warm Pool Size&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Default size&lt;/strong&gt;: maximum capacity - desired capacity = Default warm pool size&lt;/li&gt;
&lt;li&gt;Example: if maximum capacity = 10 and Desired capacity = 6 than Warm pool size = 10-6 = 4.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom size&lt;/strong&gt;: Use &lt;code&gt;MaxGroupPreparedCapacity&lt;/code&gt; option to set a custom value.&lt;/li&gt;
&lt;li&gt;Example : Maximum capacity = 20, Desired capacity = 6, custom capacity = 8 than Warm pool size = 2.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Lifecycle Hooks&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Put instances into a wait state for custom actions during launch or termination.&lt;/li&gt;
&lt;li&gt;Delay instances from being stopped or hibernated until they finish initializing.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Instance Reuse Policy&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Default: Terminates instances when scaling in and launches new instances into the warm pool.&lt;/li&gt;
&lt;li&gt;Reuse Policy: Return instances to the warm pool instead of terminating them, ensuring the pool is not over-provisioned.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  ASG Scaling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Scaling&lt;/em&gt;&lt;/strong&gt; in AWS Auto Scaling Group (ASG) refers to the &lt;strong&gt;automatic adjustment of the number of EC2 instances&lt;/strong&gt; in response to changes in demand for your application. &lt;/li&gt;
&lt;li&gt;AWS ASG ensures that your application has the right amount of compute capacity at any given time by &lt;strong&gt;scaling out&lt;/strong&gt; (increasing instances) or &lt;strong&gt;scaling in&lt;/strong&gt; (decreasing instances) based on predefined conditions or policies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaling Out&lt;/strong&gt;: Adding more instances to handle an increase in traffic or workload.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaling In&lt;/strong&gt; : Reducing the number of instances when the demand decreases, saving costs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Types of Scaling
&lt;/h3&gt;

&lt;h3&gt;
  
  
  1. Manual Scaling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Manually adjust the number of instances in the ASG.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Useful for predictable workloads or during testing.&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%2F9dmpqfzj3e7pzw0jov1y.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%2F9dmpqfzj3e7pzw0jov1y.png" alt="Manual Scaling" width="755" height="688"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Automatic Scaling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Scheduled Scaling:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Scale based on a schedule.Scales the number of instances up or down at predetermined times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Example&lt;/strong&gt;: &lt;/li&gt;
&lt;li&gt;Maintain 4 desired instance 6 max and 2 min at specific time of the day.&lt;/li&gt;
&lt;li&gt;Add 5 instances at 8 AM every weekday, remove 5 instances at 6 PM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Case&lt;/strong&gt;: &lt;/li&gt;
&lt;li&gt;Ideal for predictable load changes, such as daily or weekly traffic patterns.&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%2F46z5gjbaq1ix2apglss8.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%2F46z5gjbaq1ix2apglss8.png" alt="Scheduled Scaling" width="800" height="667"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;h3&gt;
  
  
  Predictive Scaling:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Uses machine learning to analyze historical load patterns.&lt;/li&gt;
&lt;li&gt;Proactively scales capacity up or down based on predictions.&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%2F2omgh4bmxps414d1tc53.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%2F2omgh4bmxps414d1tc53.png" alt="Predictive Scaling" width="800" height="1163"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;h3&gt;
  
  
  Dynamic Scaling:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Automatically scale based on real-time metrics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uses CloudWatch alarms&lt;/strong&gt; to trigger scaling actions.&lt;/li&gt;
&lt;li&gt;3 Types of Dynamic Scaling Policies

&lt;ol&gt;
&lt;li&gt;Simple Scaling&lt;/li&gt;
&lt;li&gt;Step Scaling&lt;/li&gt;
&lt;li&gt;Target Tracking Scaling&lt;/li&gt;
&lt;/ol&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%2Fkm8zt4hxcc1qwpcmxuyd.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%2Fkm8zt4hxcc1qwpcmxuyd.png" alt="Dynamic Scaling" width="800" height="594"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  1. Simple Scaling Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Adds or removes a fixed number of instances when a specific &lt;em&gt;metric&lt;/em&gt; breaches a threshold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Example&lt;/strong&gt;: Add 1 instance when CPU utilization exceeds 75%, remove 1 instance when CPU falls below 30%.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use Case&lt;/strong&gt;: Suitable for basic scaling needs.&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%2Ff058j1ke8obb304el1jn.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%2Ff058j1ke8obb304el1jn.png" alt="Simple Scaling" width="644" height="552"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Step Scaling Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Scales in steps based on how much the monitored &lt;em&gt;metric&lt;/em&gt; deviates from the threshold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Example&lt;/strong&gt;: 

&lt;ul&gt;
&lt;li&gt;CPU usage &amp;gt; 75%, add 2 instances.&lt;/li&gt;
&lt;li&gt;CPU usage &amp;gt; 80%, add 4 instances.&lt;/li&gt;
&lt;li&gt;CPU usage &amp;lt; 30%, remove 1 instance.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Use Case&lt;/strong&gt;: Ideal for handling variable demand with predefined increments.&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%2Fpfd6r2asft8ertkz0bpq.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%2Fpfd6r2asft8ertkz0bpq.png" alt="Step Scaling" width="800" height="700"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Target Tracking Scaling Policy
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it Works&lt;/strong&gt;: Adjusts the instance count to maintain a target value for a specific CloudWatch &lt;em&gt;metric&lt;/em&gt; (e.g., CPU utilization).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Example&lt;/strong&gt;: Set a target CPU utilization to 50%. ASG will scale instances to maintain this target.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use Case&lt;/strong&gt;: Best for maintaining consistent performance.&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%2F6rnlb5nfn60uhwt0dpn9.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%2F6rnlb5nfn60uhwt0dpn9.png" alt="alt text" width="800" height="490"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Comparison of Scaling Policies
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Scaling Policy&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Trigger&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Scaling Behavior&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Use Case&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scheduled Scaling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Predefined time intervals&lt;/td&gt;
&lt;td&gt;Scaling occurs at specified times&lt;/td&gt;
&lt;td&gt;Predictable workload patterns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Simple Scaling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Metric breaches a threshold&lt;/td&gt;
&lt;td&gt;Fixed increase or decrease in instances&lt;/td&gt;
&lt;td&gt;Basic threshold-based scaling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Step Scaling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Metric exceeds/falls below thresholds&lt;/td&gt;
&lt;td&gt;Scales in increments based on metric deviations&lt;/td&gt;
&lt;td&gt;Variable traffic with sharp demand changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Target Tracking&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CloudWatch metric reaching a target&lt;/td&gt;
&lt;td&gt;Scales to maintain a target metric&lt;/td&gt;
&lt;td&gt;Continuous, steady-state applications&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/ec2/autoscaling/" rel="noopener noreferrer"&gt;https://aws.amazon.com/ec2/autoscaling/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-benefits.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-benefits.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/compute/scaling-your-applications-faster-with-ec2-auto-scaling-warm-pools/" rel="noopener noreferrer"&gt;https://aws.amazon.com/blogs/compute/scaling-your-applications-faster-with-ec2-auto-scaling-warm-pools/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>ec2</category>
      <category>autoscaling</category>
    </item>
    <item>
      <title>Terraform Basics</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Mon, 27 Nov 2023 07:26:28 +0000</pubDate>
      <link>https://dev.to/venkatesh111/terraform-basics-5j4</link>
      <guid>https://dev.to/venkatesh111/terraform-basics-5j4</guid>
      <description>&lt;h2&gt;
  
  
  What is Terraform?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Terraform&lt;/strong&gt; is a tool for building, changing, and versioning infrastructure safely and efficiently. It is used to create/build an environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform can manage existing and popular service providers as well as custom in-house solutions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform can be used for multiple cloud providers, like AWS, Azure, or GCP.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform is developed in the &lt;strong&gt;GO&lt;/strong&gt; language.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform templates are written in a custom Domain Specific Language (DSL) called &lt;strong&gt;HashiCorp Configuration Language&lt;/strong&gt; or &lt;strong&gt;HCL&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform templates/files end with a &lt;strong&gt;.tf&lt;/strong&gt; extension.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Basics
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Terraform Definition:&lt;/strong&gt; Terraform is an open-source Infrastructure as Code (IaC) tool developed by HashiCorp. It allows you to define and provision infrastructure in a declarative configuration language. Terraform supports multiple cloud providers, including AWS, Azure, Google Cloud, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Concepts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configuration files&lt;/strong&gt; describe to Terraform the components needed to run a single application or your entire data center.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Execution plan:&lt;/strong&gt; Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Versioning:&lt;/strong&gt; As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The infrastructure Terraform can manage includes low-level components such as &lt;strong&gt;compute instances, storage, and networking&lt;/strong&gt; , as well as high-level components such as DNS entries, SaaS features, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Declarative Configuration:&lt;/strong&gt; Terraform uses declarative syntax, where you define the desired state of your infrastructure. It then determines the necessary actions to bring the actual infrastructure to that state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Infrastructure as Code (IaC):&lt;/strong&gt; Terraform enables you to manage and version your infrastructure as code, providing the benefits of version control, collaboration, and repeatability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Providers:&lt;/strong&gt; Terraform uses providers to interact with various infrastructure platforms. For AWS, you would use the AWS provider to manage resources within the AWS environment.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How Terraform Helps with AWS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resource Provisioning:&lt;/strong&gt; Terraform allows you to define AWS resources such as EC2 instances, S3 buckets, and RDS databases in code. It then provisions and manages these resources based on your configurations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Infrastructure Versioning:&lt;/strong&gt; Since Terraform configurations are code, you can version control them using tools like Git. This facilitates collaboration, rollback to previous states, and tracking changes over time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State Management:&lt;/strong&gt; Terraform maintains a state file that keeps track of the current state of your infrastructure. This state is crucial for understanding what Terraform has created and managing changes to the infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How does Terraform work?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Terraform creates and manages resources on cloud platforms and other services &lt;strong&gt;through their application programming interfaces (APIs)&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Providers&lt;/strong&gt; enable Terraform to work with virtually any platform or service with an accessible API.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform workflow
&lt;/h2&gt;

&lt;p&gt;1. &lt;strong&gt;Write Infrastructure Code (HCL):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You start by &lt;strong&gt;writing Terraform configuration files using HashiCorp Configuration Language (HCL)&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These files &lt;strong&gt;define the infrastructure components&lt;/strong&gt; you want to create, such as virtual machines, networks, or storage.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2. &lt;strong&gt;Initialize:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Run the &lt;code&gt;terraform init&lt;/code&gt; command in the directory where your configuration files are located.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This command downloads the necessary providers and sets up the backend to store the Terraform state.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3. &lt;strong&gt;Plan:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Execute &lt;code&gt;terraform plan&lt;/code&gt; to preview the changes Terraform will make to your infrastructure. It doesn't make any changes yet; it just shows you what will happen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is a safety check before making any modifications.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4. &lt;strong&gt;Apply:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If the plan looks good, you can apply the changes using &lt;code&gt;terraform apply&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform will prompt you to confirm that you want to make the proposed changes. If you're satisfied, type &lt;strong&gt;"yes,"&lt;/strong&gt; and Terraform will create or update your infrastructure according to the configuration.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;5. &lt;strong&gt;Review and Iterate:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After applying the changes, you can review the outputs and make any necessary adjustments to your configuration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you need to make changes, go back to &lt;strong&gt;step 3 (plan)&lt;/strong&gt; and then apply again.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;6. &lt;strong&gt;Destroy (Optional):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you want to tear down the infrastructure created by Terraform, you can use &lt;code&gt;terraform destroy&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This command will prompt you to confirm the destruction of resources defined in your configuration.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;7. &lt;strong&gt;Version Control:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It's a good practice to use version control (e.g., Git) to manage your Terraform configurations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This helps track changes, collaborate with others, and roll back to previous versions if needed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Let's connect and explore Terraform and AWS.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://twitter.com/venkatesh111"&gt;X: Venkatesh111&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.linkedin.com/in/venkatesh111/"&gt;LinkedIn: Venkatesh111&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/@letuscloud"&gt;YouTube: LetUsCloud&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  References :
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developer.hashicorp.com/terraform/intro"&gt;What is Terraform&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Terraform Resource Block</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Sun, 29 Oct 2023 08:46:43 +0000</pubDate>
      <link>https://dev.to/venkatesh111/terraform-resource-block-43lf</link>
      <guid>https://dev.to/venkatesh111/terraform-resource-block-43lf</guid>
      <description>&lt;p&gt;In this article, we are going to understand&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;What is Terraform resource block&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Understand Terraform basic commands&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Understand terraform resource behavior on executing terraform basic commands&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Terraform Resource Block
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A &lt;strong&gt;Terraform Resource&lt;/strong&gt; is a fundamental unit used to model and manage infrastructure components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each resource block describes one or more &lt;strong&gt;&lt;em&gt;infrastructure objects&lt;/em&gt;&lt;/strong&gt; that you want to create, modify, or manage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/resources/syntax"&gt;&lt;strong&gt;resource Syntax&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Example of a Resource Block:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Terraform Resource Behaviors
&lt;/h2&gt;

&lt;p&gt;Terraform resource behaviors refer to,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How Terraform manages and interacts with resources in your infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These behaviors determine how resources are&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Create&lt;/em&gt;&lt;/strong&gt; :&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Terraform attempts to create resources in your target infrastructure based on your configuration.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform creates resources that exist in the configuration but are not associated(present) with a real infrastructure object in the state&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Destroy&lt;/em&gt;&lt;/strong&gt; :&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Destroys resources that exist in the state/infra but no longer exist in the configuration.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Removing a resource from your Terraform configuration leads to the planned destruction of that resource in the infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Update in-place&lt;/em&gt;&lt;/strong&gt; :&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;update the resources whose arguments have changed  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform detects differences between the desired state in your configuration and the current state in the infrastructure. It plans and applies changes to update resources accordingly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Destroy and re-create&lt;/em&gt;&lt;/strong&gt; :&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Terraform will destroy and re-create resources whose arguments have changed but which cannot be updated in-place due to remote API limitations  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example: Changing the Availability zone of an AWS EC2 instance&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Dependency Management&lt;/em&gt;&lt;/strong&gt; :&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Terraform ensures dependent resources are created or updated before resources that rely on them to avoid issues.
&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Concurrency Control&lt;/em&gt;&lt;/strong&gt; :&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Terraform manages resource operation concurrency to prevent conflicts and ensure consistency.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;State Management&lt;/em&gt;&lt;/strong&gt; :&lt;/li&gt;
&lt;li&gt;Terraform maintains a state file that records the current state of the infrastructure, which is used to plan and apply updates.
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Understanding Terraform Resource Behavior with Example
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Let's Create an AWS EC2 instance and understand Terraform Resource(EC2) Behavior&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let's Execute Terraform commands to understand resource behavior&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;terraform destroy&lt;/code&gt;: &lt;em&gt;destroy or delete&lt;/em&gt; Resources&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;terraform destroy&lt;/code&gt; is like the " &lt;strong&gt;off&lt;/strong&gt;" switch for your Terraform-managed infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It tells Terraform to &lt;strong&gt;tear down and delete all the resources&lt;/strong&gt; in your infrastructure that were created or managed by Terraform.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let's understand &lt;code&gt;terraform destroy&lt;/code&gt; in more detail:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Execution:&lt;/strong&gt; Terraform analyzes your configuration and the current state of your infrastructure, just like &lt;code&gt;terraform apply&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resource Destruction:&lt;/strong&gt; However, instead of creating or updating resources, &lt;code&gt;terraform destroy&lt;/code&gt; focuses on &lt;strong&gt;destroying and deleting&lt;/strong&gt; them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User Confirmation:&lt;/strong&gt; Similar to &lt;code&gt;terraform apply&lt;/code&gt;, it shows you a summary of what it's about to destroy. It can be overridden with &lt;em&gt;auto-approve&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User Approval:&lt;/strong&gt; You must confirm by typing " &lt;strong&gt;&lt;em&gt;yes&lt;/em&gt;&lt;/strong&gt;" when prompted, ensuring you're aware of the resources that are going to be deleted.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Execution:&lt;/strong&gt; Once you confirm, Terraform executes the destruction, and you can see the progress in real-time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Completion:&lt;/strong&gt; After the resources are destroyed, Terraform &lt;strong&gt;provides a summary of what was deleted&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Example of &lt;code&gt;terraform destroy&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jHOLkQ0s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568322166/066add30-a7dc-4dc1-ad14-1c43e8e37fe7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jHOLkQ0s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568322166/066add30-a7dc-4dc1-ad14-1c43e8e37fe7.png" alt="" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZG1z6sTg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568329324/4ac55fde-f09d-41a8-9925-ba99ac88b576.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZG1z6sTg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568329324/4ac55fde-f09d-41a8-9925-ba99ac88b576.png" alt="" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZbHZygGP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568333860/1d7c0bf8-c375-432f-ad6e-49de5edec5ad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZbHZygGP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568333860/1d7c0bf8-c375-432f-ad6e-49de5edec5ad.png" alt="" width="800" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After you type &lt;strong&gt;&lt;em&gt;yes&lt;/em&gt;&lt;/strong&gt; to &lt;code&gt;terraform destroy&lt;/code&gt; prompt, terraform will start &lt;strong&gt;destroying&lt;/strong&gt; resources mentioned in the &lt;em&gt;plan&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r9rg13mr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568348930/b94fe4a7-9066-40cc-952d-87532b2a3c30.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r9rg13mr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568348930/b94fe4a7-9066-40cc-952d-87532b2a3c30.png" alt="" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You should also be able to check on your AWS Console resource (EC2) being shutting down and getting ready for termination&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mmAsRUEW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568360124/53061bb0-650b-4966-9b1b-5e736a379fd8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mmAsRUEW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568360124/53061bb0-650b-4966-9b1b-5e736a379fd8.png" alt="" width="800" height="54"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once terraform completes the execution you should be able to check on your AWS Console resource (EC2) is successfully terminated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sg7vl9-h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568376406/36b985a9-1d29-493d-beba-1e3f114facbe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sg7vl9-h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1698568376406/36b985a9-1d29-493d-beba-1e3f114facbe.png" alt="" width="800" height="57"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;terraform apply -auto-approve&lt;/em&gt; and &lt;em&gt;terraform destroy -auto-approve&lt;/em&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;&lt;em&gt;-auto-approve&lt;/em&gt;&lt;/strong&gt; flag is an option that can be added to the terraform apply command to skip the confirmation step.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you use &lt;code&gt;terraform apply -auto-approve&lt;/code&gt; or &lt;code&gt;terraform destroy -auto-approve&lt;/code&gt;, &lt;strong&gt;Terraform will not ask for your confirmation&lt;/strong&gt; and will &lt;strong&gt;immediately apply&lt;/strong&gt; the changes described in the execution plan.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This can be &lt;strong&gt;useful for automation, scripting, or CI/CD pipelines&lt;/strong&gt; where manual confirmation is not possible&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;However, &lt;strong&gt;be cautious when using &lt;em&gt;-auto-approve&lt;/em&gt; in production environments&lt;/strong&gt;, as it can lead to unintended changes if the execution plan is not thoroughly reviewed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Always review the execution plan carefully before using &lt;em&gt;-auto-approve&lt;/em&gt; command&lt;/strong&gt; to ensure that the changes are as expected and won't cause any issues in your infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J6Ap7iey--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssjmg5yc2ztk9inj3df0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J6Ap7iey--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssjmg5yc2ztk9inj3df0.jpeg" alt="tf apply auto-approve" width="770" height="494"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Let's connect and explore Terraform and AWS.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://twitter.com/venkatesh111"&gt;X: Venkatesh111&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.linkedin.com/in/venkatesh111/"&gt;LinkedIn: Venkatesh111&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/@letuscloud"&gt;YouTube: LetUsCloud&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  References :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/resources/syntax"&gt;Resource Syntax&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/resources/behavior"&gt;Resource Behavior&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.hashicorp.com/terraform/cli/run"&gt;Provisioning Infrastructure with Terraform&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>AWS CloudWatch Metric - Monitor EC2 instance reachability to EBS volumes</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Fri, 13 Oct 2023 05:27:29 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-cloudwatch-metric-monitor-ec2-instance-reachability-to-ebs-volumes-2n1p</link>
      <guid>https://dev.to/aws-builders/aws-cloudwatch-metric-monitor-ec2-instance-reachability-to-ebs-volumes-2n1p</guid>
      <description>&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;AWS announced on Oct 11, 2023, the new CloudWatch Metric &lt;strong&gt;&lt;em&gt;StatusCheckFailed_AttachedEBS&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp40ka0nwfnm1kluub5vc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp40ka0nwfnm1kluub5vc.png" alt="CW Metric" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can now use the &lt;strong&gt;&lt;em&gt;StatusCheckFailed_AttachedEBS&lt;/em&gt;&lt;/strong&gt; CloudWatch Metric to monitor EBS Volume reachability from EC2 and also EBS I/O performance&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2iih8cl6xggx4blmwe4m.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2iih8cl6xggx4blmwe4m.gif" alt="CW alarm" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;EBS Status Checks Overview:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor Amazon EBS volumes attached to instances.&lt;/li&gt;
&lt;li&gt;Check if volumes are reachable and can complete I/O operations.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;CloudWatch Key Metric: &lt;em&gt;StatusCheckFailed_AttachedEBS&lt;/em&gt; :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Metric &lt;strong&gt;&lt;em&gt;StatusCheckFailed_AttachedEBS&lt;/em&gt;&lt;/strong&gt; is s binary value indicating impairment if attached EBS volumes fail I/O operations.&lt;/li&gt;
&lt;li&gt;Detects issues with compute or EBS infrastructure.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Causes of Failure:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hardware or software issues on the storage subsystems underlying the EBS volumes&lt;/li&gt;
&lt;li&gt;Hardware issues on the physical host that impact the reachability of the EBS volumes&lt;/li&gt;
&lt;li&gt;Connectivity issues between instance and EBS volumes.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Actions for Failed Checks:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wait for AWS resolution or take proactive measures.&lt;/li&gt;
&lt;li&gt;Options include replacing affected volumes or stopping/restarting the instance.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Improving Workload Resilience:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the &lt;strong&gt;&lt;em&gt;StatusCheckFailed_AttachedEBS&lt;/em&gt;&lt;/strong&gt; metric to create CloudWatch alarms.&lt;/li&gt;
&lt;li&gt;Trigger actions like failing over to a secondary instance or Availability Zone.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Monitoring I/O Performance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Utilize EBS CloudWatch metrics to monitor and replace impaired volumes.&lt;/li&gt;
&lt;li&gt;Address physical host issues impacting EBS volume reachability.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attached EBS status check metric &lt;strong&gt;available only for Nitro instances&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The most used &lt;em&gt;t2.micro&lt;/em&gt; instance by beginners is not Nitro based instance, which means you cannot implement the &lt;strong&gt;&lt;em&gt;StatusCheckFailed_AttachedEBS&lt;/em&gt;&lt;/strong&gt; metric for &lt;em&gt;t2.micro&lt;/em&gt; instance&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The following virtualized instances are built on the Nitro System:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;General purpose:&lt;/strong&gt; &lt;em&gt;A1, M5, M5a, M5ad, M5d, M5dn, M5n, M5zn, M6a, M6g, M6gd, M6i, M6id, M6idn, M6in, M7a, M7g, M7gd, M7i, M7i-flex, T3, T3a, and T4g&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compute optimized:&lt;/strong&gt; &lt;em&gt;C5, C5a, C5ad, C5d, C5n, C6a, C6g, C6gd, C6gn, C6i, C6id, C6in, C7a, C7g, C7gd, C7gn, C7i, Hpc6a, Hpc7g, and Hpc7a&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory optimized:&lt;/strong&gt; &lt;em&gt;Hpc6id, R5, R5a, R5ad, R5b, R5d, R5dn, R5n, R6a, R6g, R6gd, R6i, R6idn, R6in, R6id, R7a, R7g, R7gd, R7iz, U-3tb1, U-6tb1, U-9tb1, U-12tb1, U-18tb1, U-24tb1, X2gd, X2idn, X2iedn, X2iezn, and z1d&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage optimized:&lt;/strong&gt; &lt;em&gt;D3, D3en, I3en, I4g, I4i, Im4gn, and Is4gen&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accelerated computing:&lt;/strong&gt; &lt;em&gt;DL1, G4ad, G4dn, G5, G5g, Inf1, Inf2, P3dn, P4d, P4de, P5, Trn1, Trn1n, and VT1&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Not viewable using the &lt;em&gt;describe-instance-status&lt;/em&gt; AWS CLI command.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Optimize Your Workload:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proactive monitoring and actions for enhanced AWS performance.&lt;/li&gt;
&lt;li&gt;Leverage metrics to ensure reliability and address issues promptly.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;For More details please check the below links&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/about-aws/whats-new/2023/10/amazon-cloudwatch-metric-monitors-reachability-ebs-volumes/" rel="noopener noreferrer"&gt;https://aws.amazon.com/about-aws/whats-new/2023/10/amazon-cloudwatch-metric-monitors-reachability-ebs-volumes/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html#attached-ebs-status-checks" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html#attached-ebs-status-checks&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/ec2/nitro/" rel="noopener noreferrer"&gt;https://aws.amazon.com/ec2/nitro/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Let's connect and explore Cloud and AWS.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/venkatesh111" rel="noopener noreferrer"&gt;X: Venkatesh111&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/venkatesh111/" rel="noopener noreferrer"&gt;LinkedIn: Venkatesh111&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/@letuscloud" rel="noopener noreferrer"&gt;YouTube: LetUsCloud&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;#AWS #EBS #CloudWatch #EC2 #Cloud&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Cloud Deployment Models</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Tue, 08 Aug 2023 06:25:45 +0000</pubDate>
      <link>https://dev.to/aws-builders/cloud-deployment-models-29m2</link>
      <guid>https://dev.to/aws-builders/cloud-deployment-models-29m2</guid>
      <description>&lt;h2&gt;
  
  
  What is a Cloud Deployment Model?
&lt;/h2&gt;

&lt;p&gt;Cloud deployment refers to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How you &lt;strong&gt;distribute&lt;/strong&gt; your cloud computing resources such as &lt;em&gt;"compute", "storage", "database" etc&lt;/em&gt; &lt;strong&gt;in terms of ownership, accessibility, and management&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It also defines, &lt;strong&gt;how cloud services or infrastructure are deployed and made available to &lt;em&gt;users&lt;/em&gt; or *organizations&lt;/strong&gt;*&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Three very popular cloud deployment models
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Public Cloud (Cloud)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Private Cloud (On-Premise)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hybrid Cloud (Public+Private)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Public Cloud
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A cloud-based application is &lt;strong&gt;fully deployed in the cloud&lt;/strong&gt; and &lt;strong&gt;all parts of the application run in the cloud&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Applications are either created in the cloud&lt;/strong&gt; &lt;strong&gt;or migrated&lt;/strong&gt; from existing infrastructure to leverage cloud computing benefits.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Ownership:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;All hardware, software, and supporting infrastructure are &lt;strong&gt;owned and managed by the cloud provider&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You share the same hardware, storage and network devices&lt;/strong&gt; with other organizations or cloud “&lt;em&gt;tenants&lt;/em&gt;”.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Accessibility:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Publicly accessible&lt;/strong&gt; by multiple users and organizations &lt;strong&gt;over the Internet&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Highly scalable&lt;/strong&gt;, resources can be easily scaled to meet your demanding needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud resources such as compute (EC2) can be &lt;strong&gt;dynamically increased or decreased based on demand&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pay-as-you-go model&lt;/strong&gt;: You pay for what you consume&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost-efficient&lt;/strong&gt; especially for start-ups and small businesses&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lower costs&lt;/strong&gt;: no need to purchase hardware or software and you pay only for the service you use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No maintenance&lt;/strong&gt;: The cloud service provider provides the maintenance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Near-unlimited scalability&lt;/strong&gt;: on-demand resources are available to meet your business needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;High reliability&lt;/strong&gt;: a vast network of servers ensures against failure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon Web Services (AWS), Microsoft Azure, Google Cloud&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Private Cloud
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cloud Offering that is &lt;strong&gt;created and owned by the same organization&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud offering that is &lt;strong&gt;dedicated to single/same organization&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The infrastructure is provisioned on the organization's premises but may be hosted in a third-party data center. In most cases, a private cloud infrastructure is implemented and &lt;strong&gt;hosted in an on-premise data center&lt;/strong&gt; &lt;strong&gt;using a virtualization layer&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Ownership:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Private Cloud is managed and &lt;strong&gt;owned by the organization itself&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Accessibility:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Restricted access&lt;/strong&gt;, limited to a specific organization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scalability depends on the organization's infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Higher upfront costs and maintenance expenses&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Private Clouds are &lt;strong&gt;more expensive than Public Cloud&lt;/strong&gt; due to the capital expenditure involved in building and maintaining the infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Private cloud &lt;strong&gt;address the security and privacy concerns raised in public cloud&lt;/strong&gt; offerings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open Stack, Azure Stack&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hybrid Cloud
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Hybrid Clouds combine &lt;strong&gt;on-premises infrastructure&lt;/strong&gt;, or &lt;strong&gt;Private Cloud, with Public Cloud&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Its &lt;strong&gt;combination of public and private cloud&lt;/strong&gt; infrastructure&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Ownership:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both Public and Private Clouds are used, Private Cloud ownership lies with organizations while Cloud Providers maintain the ownership of Public Cloud&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Accessibility:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accessible to &lt;strong&gt;multiple users and organizations&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scalability can be achieved by leveraging both environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Costs vary depending on the mix of public and private usage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make the best of Public Cloud scalability and reliability features while maintaining security controls within the organization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Outposts, Microsoft Azure Hybrid Cloud, Google Anthos&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Common Use Cases:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;you might have &lt;strong&gt;legacy applications&lt;/strong&gt; that are better-maintained on-premises, or &lt;strong&gt;government regulations&lt;/strong&gt; require your business to keep certain records on premises&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Center Extension&lt;/strong&gt;: Extending an organization's infrastructure into the cloud while connecting cloud resources to the internal system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;VMware Cloud on AWS&lt;/strong&gt;: is an integrated cloud offering delivering a scalable, secure and innovative service that allows organizations to seamlessly migrate and extend their on-premises VMware vSphere-based environments to the AWS Cloud running on next-generation Amazon Elastic Compute Cloud (Amazon EC2) bare metal infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Let's Summarize
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Public Cloud&lt;/th&gt;
&lt;th&gt;Private Cloud&lt;/th&gt;
&lt;th&gt;Hybrid Cloud&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Definition&lt;/td&gt;
&lt;td&gt;A cloud-based application fully deployed in the cloud with shared resources among multiple users and organizations.&lt;/td&gt;
&lt;td&gt;Cloud offering dedicated to a single organization, hosted on-premise or in a third-party data center using a virtualization layer.&lt;/td&gt;
&lt;td&gt;Combination of public and private cloud infrastructure, offering both on-premises and cloud resources.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ownership&lt;/td&gt;
&lt;td&gt;All hardware, software, and supporting infrastructure are owned and managed by the cloud provider.&lt;/td&gt;
&lt;td&gt;Managed and owned by the organization itself.&lt;/td&gt;
&lt;td&gt;Public Cloud owned by providers, Private Cloud owned by organizations.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accessibility&lt;/td&gt;
&lt;td&gt;Publicly accessible by multiple users and organizations over the Internet.&lt;/td&gt;
&lt;td&gt;Restricted access, limited to a specific organization.&lt;/td&gt;
&lt;td&gt;Accessible to multiple users and organizations.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scalability&lt;/td&gt;
&lt;td&gt;Highly scalable, resources can be easily scaled based on demand.&lt;/td&gt;
&lt;td&gt;Scalability depends on the organization's infrastructure.&lt;/td&gt;
&lt;td&gt;Scalability achieved by leveraging both environments.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;Pay-as-you-go model, cost-efficient for start-ups and small businesses.&lt;/td&gt;
&lt;td&gt;Higher upfront costs and maintenance expenses.&lt;/td&gt;
&lt;td&gt;Costs vary depending on the mix of public and private usage.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Advantages&lt;/td&gt;
&lt;td&gt;Lower costs, no maintenance, near-unlimited scalability, high reliability.&lt;/td&gt;
&lt;td&gt;Addresses security and privacy concerns, more control over resources.&lt;/td&gt;
&lt;td&gt;Utilizes best of public cloud scalability while maintaining security controls.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Examples&lt;/td&gt;
&lt;td&gt;Amazon Web Services (AWS), Microsoft Azure, Google Cloud.&lt;/td&gt;
&lt;td&gt;Open Stack, Azure Stack.&lt;/td&gt;
&lt;td&gt;AWS Outposts, Microsoft Azure Hybrid Cloud, Google Anthos.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Common Use Cases&lt;/td&gt;
&lt;td&gt;Applications fully in the cloud, cost-efficient scalability.&lt;/td&gt;
&lt;td&gt;Legacy applications and regulatory compliance.&lt;/td&gt;
&lt;td&gt;Data center extension, VMware Cloud on AWS.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Let's connect and discuss Cloud
&lt;/h2&gt;

&lt;p&gt;LinkedIn : &lt;a href="https://www.linkedin.com/in/venkatesh111/"&gt;https://www.linkedin.com/in/venkatesh111/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Twitter : &lt;a href="https://twitter.com/venkatesh111"&gt;https://twitter.com/venkatesh111&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;YouTube : &lt;a href="https://www.youtube.com/@letuscloud"&gt;https://www.youtube.com/@letuscloud&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>public</category>
      <category>private</category>
      <category>aws</category>
    </item>
    <item>
      <title>AWS Region – Hyderabad, Now Open for Business</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Tue, 22 Nov 2022 09:24:51 +0000</pubDate>
      <link>https://dev.to/venkatesh111/aws-region-hyderabad-now-open-for-business-345b</link>
      <guid>https://dev.to/venkatesh111/aws-region-hyderabad-now-open-for-business-345b</guid>
      <description>&lt;h2&gt;
  
  
  Announcement
&lt;/h2&gt;

&lt;p&gt;On Nov 21st 2022, AWS opened its 30th AWS Region, &lt;strong&gt;Asia Pacific (Hyderabad) Region&lt;/strong&gt;, with &lt;strong&gt;three Availability Zones&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Location

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Telangana, India&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Region API name : 

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ap-south-2&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Availability Zones : 

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;ap-south-2a (aps2-az1)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ap-south-2b (aps2-az2)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ap-south-2c (aps2-az3)&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Definition
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Region
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Is a &lt;strong&gt;physical or a geographical location&lt;/strong&gt; (Mumbai, Ohio, London, Paris and now Hyderabad) &lt;strong&gt;made up of two or more Availability Zones&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Each region is &lt;strong&gt;completely isolated from the other&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;AWS Regions &lt;strong&gt;consists of multiple Availability Zones&lt;/strong&gt; which are physically separated and isolated&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;enable and control data replication across regions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Communication between regions happens via &lt;strong&gt;public internet&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Availability Zones
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Group of one or more discrete data centers&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Each AZ is provided with &lt;strong&gt;redundant power, networking, and connectivity&lt;/strong&gt; , housed in separate facilities&lt;/li&gt;
&lt;li&gt;Availability Zones are connected with &lt;strong&gt;low latency, high throughput,&lt;/strong&gt; and &lt;strong&gt;highly redundant network&lt;/strong&gt; Availability Zones helps your production environments with &lt;strong&gt;highly available, fault tolerant, and scalable infrastructure&lt;/strong&gt; than would be possible from a single data center&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Enabling Hyderabad Region
&lt;/h2&gt;

&lt;p&gt;Please note by default you may not see the new region enabled, you will have to enable the region from your account settings, Details below&lt;/p&gt;

&lt;p&gt;Login to your AWS account&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on your &lt;strong&gt;Account id&lt;/strong&gt; on top right corner&lt;/li&gt;
&lt;li&gt;Select " &lt;strong&gt;Account&lt;/strong&gt;"&lt;/li&gt;
&lt;li&gt;Scroll Down to section " &lt;strong&gt;AWS Regions&lt;/strong&gt;"&lt;/li&gt;
&lt;li&gt;Look for &lt;strong&gt;Asia Pacific (Hyderabad)&lt;/strong&gt; region and select Enable&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%2Fe0prtnzg8m3bjb41qizg.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%2Fe0prtnzg8m3bjb41qizg.png" alt="01 AWS Region Hyd.png" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select &lt;strong&gt;Enable region&lt;/strong&gt; on next screen&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%2F5hgpqcy6siudkxm8ctfc.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%2F5hgpqcy6siudkxm8ctfc.png" alt="02 AWS Region Hyd.png" width="704" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once enabled &lt;strong&gt;it will take few sec to get activated&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%2Frnty9rf9issws8eosj5p.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%2Frnty9rf9issws8eosj5p.png" alt="03 AWS Region Hyd.png" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can click on &lt;strong&gt;refresh&lt;/strong&gt; icon to see the changes&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%2F6yos576jexqulrm975q1.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%2F6yos576jexqulrm975q1.png" alt="04 AWS Region Hyd.png" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;after successfully enabling the region you should be able to see the &lt;strong&gt;Hyderabad&lt;/strong&gt; under your region selection&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%2Fgvo6r5ksfrxcdxzmysja.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%2Fgvo6r5ksfrxcdxzmysja.png" alt="05 AWS Region Hyd.png" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Availability Zones:
&lt;/h2&gt;

&lt;p&gt;New AWS region has 3 Availability Zones&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%2Fhxw3cxltsqqgxffct428.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%2Fhxw3cxltsqqgxffct428.png" alt="06 AWS Region Hyd AZ.png" width="800" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Surely, I wanted to try few services and I launched an &lt;strong&gt;EC2 instance&lt;/strong&gt; and &lt;strong&gt;created S3 bucket&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  EC2 instance in Hyderabad Region
&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%2Ft0804mpef9zcuobgy9nx.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%2Ft0804mpef9zcuobgy9nx.png" alt="07 AWS Region Hyd EC2.png" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  S3 bucket in Hyderabad Region
&lt;/h2&gt;

&lt;p&gt;If its Hyderabad than how can one not bring up biryani :)&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%2Fy6gt83s7vzyudnsnyyvo.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%2Fy6gt83s7vzyudnsnyyvo.png" alt="08 AWS Region Hyd S3 Bucket.png" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Services in Hyderabad Region:
&lt;/h2&gt;

&lt;p&gt;In the new Hyderabad Region, youcan use&lt;a href="https://aws.amazon.com/blogs/aws/now-available-compute-intensive-c5-instances-for-amazon-ec2/" rel="noopener noreferrer"&gt;C5&lt;/a&gt;,&lt;a href="https://aws.amazon.com/blogs/aws/ec2-instance-update-c5-instances-with-local-nvme-storage-c5d/" rel="noopener noreferrer"&gt;C5d&lt;/a&gt;, &lt;a href="https://aws.amazon.com/blogs/aws/new-graviton2-instance-types-c6g-r6g-and-their-d-variant/" rel="noopener noreferrer"&gt;C6g&lt;/a&gt;,&lt;a href="https://aws.amazon.com/blogs/aws/m5-the-next-generation-of-general-purpose-ec2-instances/" rel="noopener noreferrer"&gt;M5&lt;/a&gt;,&lt;a href="https://aws.amazon.com/blogs/aws/ec2-instance-update-m5-instances-with-local-nvme-storage-m5d/" rel="noopener noreferrer"&gt;M5d&lt;/a&gt;,&lt;a href="https://aws.amazon.com/blogs/aws/new-graviton2-instance-types-c6g-r6g-and-their-d-variant/" rel="noopener noreferrer"&gt;M6gd&lt;/a&gt;,&lt;a href="https://aws.amazon.com/blogs/aws/now-available-r5-r5d-and-z1d-instances/" rel="noopener noreferrer"&gt;R5&lt;/a&gt;,&lt;a href="https://aws.amazon.com/blogs/aws/now-available-r5-r5d-and-z1d-instances/" rel="noopener noreferrer"&gt;R5d&lt;/a&gt;, &lt;a href="https://aws.amazon.com/ec2/instance-types/r6g/" rel="noopener noreferrer"&gt;R6g&lt;/a&gt;, &lt;a href="https://aws.amazon.com/blogs/aws/now-available-i3-instances-for-demanding-io-intensive-applications/" rel="noopener noreferrer"&gt;I3&lt;/a&gt;,&lt;a href="https://aws.amazon.com/blogs/aws/new-the-next-generation-i3en-of-i-o-optimized-ec2-instances/" rel="noopener noreferrer"&gt;I3en&lt;/a&gt;, &lt;a href="https://aws.amazon.com/blogs/aws/new-t3-instances-burstable-cost-effective-performance/" rel="noopener noreferrer"&gt;T3&lt;/a&gt;, and &lt;a href="https://aws.amazon.com/ec2/instance-types/t4/" rel="noopener noreferrer"&gt;T4g&lt;/a&gt; instances, anduse a long list of AWS services including: &lt;a href="http://aws.amazon.com/apigateway" rel="noopener noreferrer"&gt;Amazon API Gateway&lt;/a&gt;, &lt;a href="https://aws.amazon.com/systems-manager/features/appconfig" rel="noopener noreferrer"&gt;AWS AppConfig&lt;/a&gt;, &lt;a href="https://aws.amazon.com/autoscaling/" rel="noopener noreferrer"&gt;AWS Application Auto Scaling&lt;/a&gt;, &lt;a href="https://aws.amazon.com/rds/aurora/" rel="noopener noreferrer"&gt;Amazon Aurora&lt;/a&gt;, &lt;a href="https://aws.amazon.com/ec2/autoscaling/" rel="noopener noreferrer"&gt;Amazon EC2 Auto Scaling&lt;/a&gt;, &lt;a href="https://aws.amazon.com/config" rel="noopener noreferrer"&gt;AWS Config&lt;/a&gt;, &lt;a href="https://aws.amazon.com/certificate-manager" rel="noopener noreferrer"&gt;AWS Certificate Manager&lt;/a&gt;, &lt;a href="https://aws.amazon.com/cloudcontrolapi/" rel="noopener noreferrer"&gt;AWS Cloud Control API&lt;/a&gt;, &lt;a href="https://aws.amazon.com/cloudformation" rel="noopener noreferrer"&gt;AWS CloudFormation&lt;/a&gt;, &lt;a href="https://aws.amazon.com/cloudtrail" rel="noopener noreferrer"&gt;AWS CloudTrail&lt;/a&gt;, &lt;a href="https://aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;Amazon CloudWatch&lt;/a&gt;, &lt;a href="https://aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;Amazon CloudWatch Events&lt;/a&gt;, &lt;a href="https://aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;Amazon CloudWatch Logs&lt;/a&gt;, &lt;a href="https://aws.amazon.com/codedeploy" rel="noopener noreferrer"&gt;AWS CodeDeploy&lt;/a&gt;, &lt;a href="https://aws.amazon.com/dms" rel="noopener noreferrer"&gt;AWS Database Migration Service&lt;/a&gt;, &lt;a href="https://aws.amazon.com/directconnect" rel="noopener noreferrer"&gt;AWS Direct Connect&lt;/a&gt;, &lt;a href="https://aws.amazon.com/dynamodb" rel="noopener noreferrer"&gt;Amazon DynamoDB&lt;/a&gt;, &lt;a href="https://aws.amazon.com/ebs" rel="noopener noreferrer"&gt;Amazon Elastic Block Store (Amazon EBS)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/ec2" rel="noopener noreferrer"&gt;Amazon Elastic Compute Cloud (Amazon EC2)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/ecr" rel="noopener noreferrer"&gt;Amazon Elastic Container Registry (Amazon ECR)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/ecs" rel="noopener noreferrer"&gt;Amazon Elastic Container Service (Amazon ECS)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/elasticache/" rel="noopener noreferrer"&gt;Amazon ElastiCache&lt;/a&gt;, &lt;a href="https://aws.amazon.com/emr" rel="noopener noreferrer"&gt;Amazon EMR&lt;/a&gt;, &lt;a href="https://aws.amazon.com/elasticloadbalancing/" rel="noopener noreferrer"&gt;Elastic Load Balancing&lt;/a&gt;, &lt;a href="https://aws.amazon.com/elasticloadbalancing/" rel="noopener noreferrer"&gt;Elastic Load Balancing Network (NLB)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/eventbridge" rel="noopener noreferrer"&gt;Amazon EventBridge&lt;/a&gt;, &lt;a href="https://aws.amazon.com/fargate" rel="noopener noreferrer"&gt;AWS Fargate&lt;/a&gt;, &lt;a href="https://aws.amazon.com/premiumsupport/technology/aws-health-dashboard/" rel="noopener noreferrer"&gt;AWS Health Dashboard&lt;/a&gt;, &lt;a href="https://aws.amazon.com/iam" rel="noopener noreferrer"&gt;AWS Identity and Access Management (IAM)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/kinesis" rel="noopener noreferrer"&gt;Amazon Kinesis Data Streams&lt;/a&gt;, &lt;a href="https://aws.amazon.com/kms" rel="noopener noreferrer"&gt;AWS Key Management Service (AWS KMS)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/lambda" rel="noopener noreferrer"&gt;AWS Lambda&lt;/a&gt;, &lt;a href="https://aws.amazon.com/marketplace" rel="noopener noreferrer"&gt;AWS Marketplace&lt;/a&gt;, &lt;a href="https://aws.amazon.com/opensearch-service/" rel="noopener noreferrer"&gt;Amazon OpenSearch Service&lt;/a&gt;, &lt;a href="https://aws.amazon.com/rds/" rel="noopener noreferrer"&gt;Amazon Relational Database Service (Amazon RDS)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/redshift" rel="noopener noreferrer"&gt;Amazon Redshift&lt;/a&gt;, &lt;a href="https://aws.amazon.com/route53" rel="noopener noreferrer"&gt;Amazon Route 53&lt;/a&gt;, &lt;a href="https://aws.amazon.com/secrets-manager/" rel="noopener noreferrer"&gt;AWS Secrets Manager&lt;/a&gt;, &lt;a href="https://aws.amazon.com/s3" rel="noopener noreferrer"&gt;Amazon Simple Storage Service (Amazon S3)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/s3/storage-classes/glacier/" rel="noopener noreferrer"&gt;Amazon S3 Glacier&lt;/a&gt;, &lt;a href="https://aws.amazon.com/sns" rel="noopener noreferrer"&gt;Amazon Simple Notification Service (Amazon SNS)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/sqs" rel="noopener noreferrer"&gt;Amazon Simple Queue Service (Amazon SQS)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/step-functions" rel="noopener noreferrer"&gt;AWS Step Functions&lt;/a&gt;, &lt;a href="https://aws.amazon.com/documentation/awssupport/" rel="noopener noreferrer"&gt;AWS Support API&lt;/a&gt;, &lt;a href="https://aws.amazon.com/swf" rel="noopener noreferrer"&gt;Amazon Simple Workflow Service (Amazon SWF)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/systems-manager/" rel="noopener noreferrer"&gt;AWS Systems Manager&lt;/a&gt;, &lt;a href="https://aws.amazon.com/premiumsupport/technology/trusted-advisor/" rel="noopener noreferrer"&gt;AWS Trusted Advisor&lt;/a&gt;, &lt;a href="https://aws.amazon.com/premiumsupport/technology/trusted-advisor/" rel="noopener noreferrer"&gt;VM Import/Export&lt;/a&gt;, &lt;a href="https://aws.amazon.com/vpc" rel="noopener noreferrer"&gt;Amazon Virtual Private Cloud (Amazon VPC)&lt;/a&gt;, &lt;a href="https://aws.amazon.com/vpn/" rel="noopener noreferrer"&gt;AWS VPN&lt;/a&gt;, and &lt;a href="https://aws.amazon.com/x-ray/" rel="noopener noreferrer"&gt;AWS X-Ray&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With this launch, AWS now spans &lt;strong&gt;96 Availability Zones&lt;/strong&gt; within &lt;strong&gt;30 geographic Regions&lt;/strong&gt; around the world, with three new Regions launched in 2022, including the &lt;a href="https://aws.amazon.com/blogs/aws/now-open-aws-region-in-the-united-arab-emirates-uae/" rel="noopener noreferrer"&gt;AWS Middle East (UAE)&lt;/a&gt; Region, the &lt;a href="https://aws.amazon.com/blogs/aws/a-new-aws-region-opens-in-switzerland/" rel="noopener noreferrer"&gt;AWS Europe (Zurich)&lt;/a&gt; Region, and the &lt;a href="https://aws.amazon.com/blogs/aws/now-open-aws-region-in-spain" rel="noopener noreferrer"&gt;AWS Europe (Spain)&lt;/a&gt; Region. AWS also announced plans for 15 more Availability Zones and five more AWS Regions in &lt;a href="https://aws.amazon.com/blogs/aws/in-the-works-aws-region-in-melbourne-australia/" rel="noopener noreferrer"&gt;Australia&lt;/a&gt;, &lt;a href="https://aws.amazon.com/blogs/aws/in-the-works-aws-canada-west-calgary-region/" rel="noopener noreferrer"&gt;Canada&lt;/a&gt;, &lt;a href="https://aws.amazon.com/blogs/aws/in-the-works-aws-region-in-tel-aviv-israel/" rel="noopener noreferrer"&gt;Israel&lt;/a&gt;, &lt;a href="https://aws.amazon.com/blogs/aws/in-the-works-aws-region-in-new-zealand/" rel="noopener noreferrer"&gt;New Zealand&lt;/a&gt;, and &lt;a href="https://aws.amazon.com/blogs/aws/aws-week-in-review-october-24-2022/" rel="noopener noreferrer"&gt;Thailand&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source :
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/blogs/aws/now-open-the-30th-aws-region-asia-pacific-hyderabad-region-in-india/" rel="noopener noreferrer"&gt;AWS News Blog&lt;/a&gt;&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>Amazon Prime Day 2022</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Tue, 26 Jul 2022 13:39:27 +0000</pubDate>
      <link>https://dev.to/venkatesh111/amazon-prime-day-2022-eco</link>
      <guid>https://dev.to/venkatesh111/amazon-prime-day-2022-eco</guid>
      <description>&lt;p&gt;A look at how different AWS services were utilized during Amazon Prime Day 2022 (US) (10th July - 16th July 2022)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preparations&lt;/strong&gt; :&lt;br&gt;&lt;br&gt;
A multitude of two-pizza teams worked together to make sure that every part of AWS infrastructure was &lt;strong&gt;scaled&lt;/strong&gt; , &lt;strong&gt;tested&lt;/strong&gt; , and &lt;strong&gt;ready to serve&lt;/strong&gt; end users who were eager to shop during US Amazon Prime day sale (10th July - 16th July)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--I_MVtb6A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658838521665/nDGD6SaPH.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I_MVtb6A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658838521665/nDGD6SaPH.png" alt="image.png" width="880" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--glZKsIul--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658839053889/Iy02PsfWi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--glZKsIul--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658839053889/Iy02PsfWi.png" alt="image.png" width="880" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3VpwvMlP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658839296524/GNJr1BsC6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3VpwvMlP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658839296524/GNJr1BsC6.png" alt="image.png" width="880" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t_eqKME9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658839338158/l7t0aQy5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t_eqKME9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658839338158/l7t0aQy5s.png" alt="image.png" width="880" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ytFUc-xr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658839369182/Ac9BdkvT2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ytFUc-xr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658839369182/Ac9BdkvT2.png" alt="image.png" width="880" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;for more details please check below AWS News Blog&lt;a href="https://aws.amazon.com/blogs/aws/amazon-prime-day-2022-aws-for-the-win"&gt;https://aws.amazon.com/blogs/aws/amazon-prime-day-2022-aws-for-the-win&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow me on &lt;a href="https://www.linkedin.com/in/venkatesh111/"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://twitter.com/venkatesh111"&gt;Twitter&lt;/a&gt; for more such articles in cloud tech&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Amazon EC2 - Protect instances from unintentional shutdown</title>
      <dc:creator>Venkatesh K</dc:creator>
      <pubDate>Fri, 22 Jul 2022 08:45:05 +0000</pubDate>
      <link>https://dev.to/venkatesh111/amazon-ec2-protect-instances-from-unintentional-shutdown-21l</link>
      <guid>https://dev.to/venkatesh111/amazon-ec2-protect-instances-from-unintentional-shutdown-21l</guid>
      <description>&lt;p&gt;You can now enable accidental stop protection for EC2 Instance just like &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/terminating-instances.html#Using_ChangingDisableAPITermination" rel="noopener noreferrer"&gt;accidental termination protection&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;here is how you can do in 6 easy steps&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Select&lt;/strong&gt; your EC2 Instance&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Actions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Instance Settings&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Change stop protection&lt;/strong&gt; ( this is the new feature added)&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Enable&lt;/strong&gt; under Stop protection&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4CQC1Xae--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1658473028009/RrxTf34C6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4CQC1Xae--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1658473028009/RrxTf34C6.png" alt="image.png" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aeUFFIA8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1658473052740/RbCSQcM3Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aeUFFIA8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1658473052740/RbCSQcM3Q.png" alt="image.png" width="585" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To disable the feature just uncheck the "Enable" option at Step 5&lt;/p&gt;

&lt;p&gt;Special Considerations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not applicable for Scheduled Event that stops the instance&lt;/li&gt;
&lt;li&gt;No change to Auto scaling behavior ( if instance is unhealthy instance will be terminated per ASG rules)&lt;/li&gt;
&lt;li&gt;Not applicable for instance store-backed instances&lt;/li&gt;
&lt;li&gt;Not applicable for Spot Instances.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;for more details check AWS announcement page and AWS documentation&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2022/05/amazon-ec2-enables-protect-instances-unintentional-stop-actions" rel="noopener noreferrer"&gt;https://aws.amazon.com/about-aws/whats-new/2022/05/amazon-ec2-enables-protect-instances-unintentional-stop-actions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection&lt;/a&gt;&lt;/p&gt;

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