<?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: Ahmed Shendy</title>
    <description>The latest articles on DEV Community by Ahmed Shendy (@ahmedshendy).</description>
    <link>https://dev.to/ahmedshendy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F663638%2F528cad0f-b794-4618-b85f-e2e4abb03bbe.jpeg</url>
      <title>DEV Community: Ahmed Shendy</title>
      <link>https://dev.to/ahmedshendy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmedshendy"/>
    <language>en</language>
    <item>
      <title>Aurora Serverless v2: When "I/O Optimized" Actually Costs You More</title>
      <dc:creator>Ahmed Shendy</dc:creator>
      <pubDate>Thu, 25 Dec 2025 11:48:05 +0000</pubDate>
      <link>https://dev.to/aws-builders/aurora-serverless-v2-when-io-optimized-actually-costs-you-more-4bb2</link>
      <guid>https://dev.to/aws-builders/aurora-serverless-v2-when-io-optimized-actually-costs-you-more-4bb2</guid>
      <description>&lt;h2&gt;
  
  
  The Request
&lt;/h2&gt;

&lt;p&gt;It started with a simple Slack message from my manager:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"We've been running on **Aurora I/O Optimized&lt;/em&gt;* for a few months. Can we save money by converting back to &lt;strong&gt;Standard&lt;/strong&gt;?"*&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We had enabled I/O Optimized previously because the promise of &lt;strong&gt;"Free IOPS"&lt;/strong&gt; sounded perfect for our high-traffic workloads. But without recent validation, we were flying blind.&lt;/p&gt;

&lt;p&gt;This is the story of how I validated the costs, the "CloudWatch Trap" I fell into, and why we ultimately decided to revert to Standard—saving the company up to 26% on our database bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Difference: It’s a Billing Flag, Not Hardware
&lt;/h2&gt;

&lt;p&gt;My first step was checking if reverting would hurt performance. I dug into the &lt;a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.StorageReliability.html#aurora-storage-type" rel="noopener noreferrer"&gt;AWS Documentation&lt;/a&gt; and confirmed that switching between &lt;strong&gt;Standard&lt;/strong&gt; and &lt;strong&gt;I/O Optimized&lt;/strong&gt; does &lt;strong&gt;not&lt;/strong&gt; change the underlying hardware. It is purely a billing configuration.&lt;/p&gt;

&lt;p&gt;Here is the trade-off (based on &lt;code&gt;eu-west-1&lt;/code&gt; pricing):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Standard Model&lt;/th&gt;
&lt;th&gt;I/O Optimized Model (Our State)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Compute (ACUs)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$0.14 / hr&lt;/td&gt;
&lt;td&gt;~$0.19 / hr&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Storage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$0.11 / GB&lt;/td&gt;
&lt;td&gt;~$0.25 / GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;I/O Requests&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$0.22 / Million&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.00&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The math seems simple: &lt;em&gt;Were we actually consuming enough IOPS to justify the massive premium we were paying for Compute and Storage?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The "CloudWatch Trap"
&lt;/h2&gt;

&lt;p&gt;To answer that question, I tried to write a Python script to pull metrics from CloudWatch. I calculated the &lt;code&gt;ServerlessDatabaseCapacity&lt;/code&gt; (ACUs) using the "Average" statistic over 30 days.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Result:&lt;/strong&gt; The calculations was not accurate&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why? Granularity.
&lt;/h3&gt;

&lt;p&gt;Aurora Serverless scales second-by-second. If your database spikes to 60 ACUs for 30 seconds and then drops, the AWS billing engine captures that cost perfectly. CloudWatch, however, averages that spike into the surrounding timeframe (often 1-5 minutes), smoothing out the data.&lt;/p&gt;

&lt;p&gt;This makes the usage look much lower (and cheaper) than it actually is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson Learned:&lt;/strong&gt; Never use CloudWatch averages to calculate your total monthly bill. It is a monitoring tool, not an accounting tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: The "10-Day Snapshot" Method
&lt;/h2&gt;

&lt;p&gt;Since I couldn't trust CloudWatch for the total ACU cost, and AWS Cost Explorer is limited to 14 days of granular resource data, I developed a hybrid approach: &lt;strong&gt;The 10-Day Snapshot.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The logic is simple: &lt;em&gt;If we are losing money over a representative 10-day period, we are losing money over the month.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: The Source of Truth (Cost Explorer)
&lt;/h3&gt;

&lt;p&gt;I used Cost Explorer to get the exact billed amount for Compute (ACUs) for a specific window (e.g., Dec 11 - Dec 20).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dimension:&lt;/strong&gt; &lt;code&gt;Resource&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filter:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Usage Type:&lt;/strong&gt; &lt;code&gt;EU-Aurora:ServerlessV2IOOptimizedUsage (ACU-Hr)&lt;/code&gt; (Since we were currently Optimized)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource:&lt;/strong&gt; Select the relational databse then selct the DB instances &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Get the exact amount of the used I/O.&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%2F9big0in7mbqj8mezy8kq.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%2F9big0in7mbqj8mezy8kq.png" alt="Cost Explorer" width="452" height="533"&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%2Fvcyrjf9b6zagu0q5bsgu.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%2Fvcyrjf9b6zagu0q5bsgu.png" alt="Cost Explorer" width="472" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: The Variable Costs (CloudWatch)
&lt;/h3&gt;

&lt;p&gt;Since Cost Explorer doesn't easily split out "Storage" vs. "I/O" quantity for a specific custom window, I used the CloudWatch Console to get the raw usage data for the &lt;em&gt;exact same&lt;/em&gt; 10-day period.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is exactly how I got the numbers:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Navigate to Metrics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;strong&gt;CloudWatch &amp;gt; All metrics&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;AWS/RDS&lt;/strong&gt; &amp;gt; &lt;strong&gt;DBClusterIdentifier&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Search for your cluster ID (e.g., &lt;code&gt;client-db-01&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Select the Metrics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check &lt;strong&gt;&lt;code&gt;VolumeBytesUsed&lt;/code&gt;&lt;/strong&gt; (for Storage).&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;&lt;code&gt;VolumeReadIOPS&lt;/code&gt;&lt;/strong&gt; (for I/O).&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;&lt;code&gt;VolumeWriteIOPS&lt;/code&gt;&lt;/strong&gt; (for I/O).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set the Timeframe:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click the date picker in the top-right.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Custom&lt;/strong&gt; &amp;gt; &lt;strong&gt;Absolute&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose the &lt;strong&gt;exact same 10-day window&lt;/strong&gt; you used in Cost Explorer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure the Calculations (Graphed Metrics Tab):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;For Storage:&lt;/strong&gt; Set the Statistic to &lt;strong&gt;Average&lt;/strong&gt;.

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Math:&lt;/em&gt; Add the expression &lt;code&gt;m1/1024/1024/1024&lt;/code&gt; to convert raw bytes into &lt;strong&gt;GB&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For I/O:&lt;/strong&gt; Set the Statistic to &lt;strong&gt;Sum&lt;/strong&gt;.

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Math:&lt;/em&gt; Add the expression &lt;code&gt;m2+m3&lt;/code&gt; to add Read and Write IOPS together for the &lt;strong&gt;Total IOPS&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Important:&lt;/strong&gt; Ensure the "Period" is set to &lt;strong&gt;30 Days&lt;/strong&gt; (or a custom value like &lt;code&gt;864000&lt;/code&gt; seconds) so that CloudWatch gives you one single number for the entire duration, rather than a line graph.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz284al2emrwn9gko0dxq.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%2Fz284al2emrwn9gko0dxq.png" alt="The Variable Costs (CloudWatch)" width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: The Comparison
&lt;/h3&gt;

&lt;p&gt;Now we have the exact numbers for Total I/O, the Storage, and consumed ACUs.&lt;br&gt;
I put the numbers into a spreadsheet to compare our current costs vs. what we &lt;em&gt;would&lt;/em&gt; pay if we switched to Standard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario A: I/O Optimized (Actual Cost)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ACU Cost:&lt;/strong&gt; &lt;code&gt;(Amount of used ACUs Cost Explorer) * 0.19&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage Cost:&lt;/strong&gt; &lt;code&gt;Avg GB * $0.248 * (10/30)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IOPS Cost:&lt;/strong&gt; $0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scenario B: Standard (Projected Cost)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ACU Cost:&lt;/strong&gt; &lt;code&gt;(Amount of used ACUs Cost Explorer) * 0.14&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage Cost:&lt;/strong&gt; &lt;code&gt;Avg GB * $0.11 * (10/30)&lt;/code&gt; &lt;em&gt;(The cheaper storage rate)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IOPS Cost:&lt;/strong&gt; &lt;code&gt;(Total IOPS) / 1,000,000 * $0.22&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Verdict
&lt;/h2&gt;

&lt;p&gt;The results were eye-opening. We were overpaying on every single cluster.&lt;/p&gt;

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

&lt;p&gt;We immediately scheduled maintenance windows and &lt;strong&gt;converted all clusters back to Aurora Standard.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The validation proved that while "Optimized" sounds better, sometimes the "Standard" option is the true hero for your budget. If you are currently running on I/O Optimized, take a 10-day snapshot and check your storage costs—you might be surprised by what you find.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>postgres</category>
      <category>finops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>DNS Failures in EKS? The Real Bottleneck Was AWS Network Limits</title>
      <dc:creator>Ahmed Shendy</dc:creator>
      <pubDate>Thu, 18 Dec 2025 06:51:04 +0000</pubDate>
      <link>https://dev.to/ahmedshendy/dns-failures-in-eks-the-real-bottleneck-was-aws-network-limits-fi</link>
      <guid>https://dev.to/ahmedshendy/dns-failures-in-eks-the-real-bottleneck-was-aws-network-limits-fi</guid>
      <description>&lt;p&gt;During the DNS investigation, I initially focused on CoreDNS and NodeLocal DNS metrics.&lt;/p&gt;

&lt;p&gt;The real breakthrough came when I started correlating DNS failures with &lt;strong&gt;AWS instance-level network limits&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The most useful signals came from network allowance metrics exposed by the EC2 ENA driver via &lt;code&gt;ethtool&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS Network Allowance Metrics
&lt;/h2&gt;

&lt;p&gt;The following metrics represent network limits enforced at the EC2 instance level.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ethtool_linklocal_allowance_exceeded&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Packets dropped because traffic to link-local services exceeded the packets-per-second (PPS) limit.&lt;br&gt;&lt;br&gt;
This directly affects DNS, IMDS, and Amazon Time Sync. If you found this value above zero, you can 1) try increasing the number of CoreDNS replicas or 2) implement NodeLocal DNSCache or 3) check the ndots as mentioned in this post &lt;a href="https://dev.to/ahmedshendy/the-hidden-dns-misconfiguration-that-was-killing-performance-in-our-eks-cluster-and-how-we-fixed-2onm"&gt;The Hidden DNS Misconfiguration That Was Killing Performance in Our EKS Cluster (and How We Fixed it)&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ethtool_conntrack_allowance_available&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Remaining number of connections that can be tracked before reaching the instance’s connection-tracking limit.&lt;br&gt;&lt;br&gt;
Supported on Nitro-based instances only.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ethtool_conntrack_allowance_exceeded&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Packets dropped because the connection-tracking limit was exceeded and new connections could not be established.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ethtool_bw_in_allowance_exceeded&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Packets queued or dropped because inbound aggregate bandwidth exceeded the instance limit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ethtool_bw_out_allowance_exceeded&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Packets queued or dropped because outbound aggregate bandwidth exceeded the instance limit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ethtool_pps_allowance_exceeded&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Packets queued or dropped because the bidirectional packets-per-second (PPS) limit was exceeded.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;All &lt;code&gt;*_allowance_exceeded&lt;/code&gt; metrics should ideally remain &lt;strong&gt;zero&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Any sustained non-zero value indicates a networking bottleneck at the instance level.&lt;br&gt;
For all metrics except the link-local you can solve it by changing the instance size or type to get a higher network bandwidth or work on reducing the load on this instance.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Capturing Network Metrics in EKS
&lt;/h2&gt;

&lt;p&gt;These metrics are exposed by the EC2 ENA driver via &lt;code&gt;ethtool&lt;/code&gt;, collected by &lt;strong&gt;node exporter&lt;/strong&gt;, scraped by &lt;strong&gt;Prometheus&lt;/strong&gt;, and visualized in &lt;strong&gt;Grafana&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On Amazon Linux EKS nodes, &lt;code&gt;ethtool&lt;/code&gt; is installed by default.&lt;/p&gt;

&lt;p&gt;To collect these metrics, the &lt;code&gt;ethtool&lt;/code&gt; collector must be enabled in node exporter.&lt;/p&gt;




&lt;h2&gt;
  
  
  Enable ethtool Collector in node exporter
&lt;/h2&gt;

&lt;p&gt;Add the following arguments to the node exporter container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;containers:
- args:
  - --collector.ethtool
  - --collector.ethtool.device-include=(eth|em|eno|ens|enp)[0-9s]+
  - --collector.ethtool.metrics-include=.*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After applying this change, the metrics will become available in Prometheus and Grafana.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building the Grafana Dashboard
&lt;/h2&gt;

&lt;p&gt;All panels are time series panels, built per node, to help correlate network saturation with DNS errors or latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Available Connection Tracking Capacity
&lt;/h3&gt;

&lt;p&gt;The metric exported by node exporter is:&lt;/p&gt;

&lt;p&gt;node_ethtool_conntrack_allowance_available&lt;/p&gt;

&lt;p&gt;It represents the current number of connections that can still be tracked on each node.&lt;br&gt;
PromQL query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node_ethtool_conntrack_allowance_available{job="node-exporter"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnayixbekb1k28sy3elhg.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%2Fnayixbekb1k28sy3elhg.png" alt="AWS instance-level available connections" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Packets Dropped Due to Conntrack Exhaustion
&lt;/h3&gt;

&lt;p&gt;The metric &lt;code&gt;node_ethtool_conntrack_allowance_exceeded&lt;/code&gt; is a counter that increases over time.&lt;br&gt;
To calculate packet drops per second, use the &lt;code&gt;rate()&lt;/code&gt; function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sum by (instance) (
  rate(
    node_ethtool_conntrack_allowance_exceeded{job="node-exporter"}[1m]
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the panel will be like this&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%2Fynvpzsi0yh13nfmjbec4.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%2Fynvpzsi0yh13nfmjbec4.png" alt="Packets Dropped Due to Conntrack Exhaustion" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Other Network Allowance Exceeded Metrics
&lt;/h3&gt;

&lt;p&gt;Add the following panels using the same counter-to-rate approach.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;node_ethtool_bw_in_allowance_exceeded&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;node_ethtool_bw_out_allowance_exceeded&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;node_ethtool_pps_allowance_exceeded&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;node_ethtool_linklocal_allowance_exceeded&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each panel shows packets dropped per second per node.&lt;/p&gt;

&lt;p&gt;Full Grafana dashboard JSON:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://raw.githubusercontent.com/ahmedshendy/grafana-dashboards/refs/heads/main/Network%20limits.json" rel="noopener noreferrer"&gt;Network limits dashboard&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Insight
&lt;/h2&gt;

&lt;p&gt;All allowance exceeded metrics are tied to EC2 instance sizing, with one exception.&lt;/p&gt;

&lt;p&gt;Link-local traffic has a fixed limit of &lt;strong&gt;1024 packets per second&lt;/strong&gt;, regardless of instance size.&lt;/p&gt;

&lt;p&gt;This explains why DNS can fail even when CPU, memory, and pod-level metrics look healthy.&lt;/p&gt;

&lt;p&gt;The bottleneck exists &lt;strong&gt;below Kubernetes&lt;/strong&gt;, at the EC2 networking layer.&lt;/p&gt;




&lt;h3&gt;
  
  
  Takeaway
&lt;/h3&gt;

&lt;p&gt;If you are debugging intermittent DNS failures on EKS, do not stop at CoreDNS metrics.&lt;/p&gt;

&lt;p&gt;Always inspect &lt;strong&gt;instance-level network allowances&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>eks</category>
      <category>aws</category>
      <category>kubernetes</category>
      <category>observability</category>
    </item>
    <item>
      <title>🚀 The Hidden DNS Misconfiguration That Was Killing Performance in Our EKS Cluster (and How We Fixed it)</title>
      <dc:creator>Ahmed Shendy</dc:creator>
      <pubDate>Sat, 06 Dec 2025 14:29:38 +0000</pubDate>
      <link>https://dev.to/ahmedshendy/the-hidden-dns-misconfiguration-that-was-killing-performance-in-our-eks-cluster-and-how-we-fixed-2onm</link>
      <guid>https://dev.to/ahmedshendy/the-hidden-dns-misconfiguration-that-was-killing-performance-in-our-eks-cluster-and-how-we-fixed-2onm</guid>
      <description>&lt;h2&gt;
  
  
  Why I Wrote This Article — The Incident That Sparked Everything
&lt;/h2&gt;

&lt;p&gt;This article didn’t come from curiosity.&lt;br&gt;&lt;br&gt;
It came from pain.&lt;/p&gt;

&lt;p&gt;One morning, I received a message from the DevOps team:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Some services are failing to resolve hostnames again —&lt;br&gt;&lt;br&gt;
 we’re getting &lt;strong&gt;Temporary failure in name resolution&lt;/strong&gt;.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And this wasn’t the first time.&lt;br&gt;&lt;br&gt;
It had happened before — randomly, unpredictably, quietly causing latency and connection failures.&lt;/p&gt;

&lt;p&gt;As the new Cloud Architect, the responsibility landed on my desk:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“We need this fixed forever — no more band-aids.”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I started investigating.&lt;/p&gt;

&lt;p&gt;(NOTE: I’ll publish a second article soon with the full debugging journey.)&lt;/p&gt;

&lt;p&gt;Nothing looked broken at first.&lt;br&gt;&lt;br&gt;
Pods healthy. Cluster stable. CoreDNS replicas are running.&lt;br&gt;&lt;br&gt;
No crashes. No alerts.&lt;/p&gt;

&lt;p&gt;But something felt off — so I went deep into metrics.&lt;/p&gt;

&lt;p&gt;And there it was:&lt;/p&gt;
&lt;h3&gt;
  
  
  CoreDNS wasn’t resolving —
&lt;/h3&gt;
&lt;h3&gt;
  
  
  it was drowning in &lt;strong&gt;NXDOMAIN&lt;/strong&gt;.
&lt;/h3&gt;

&lt;p&gt;Thousands per second.&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%2Fvdhda8lss08rntdh8fwb.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%2Fvdhda8lss08rntdh8fwb.png" alt="NXDOMAIN vs NOERROR over time (Query per second)" width="800" height="178"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It wasn’t an outage.&lt;br&gt;&lt;br&gt;
It was a storm — a silent performance killer - we have around 80% of the DNS queries with response code NXDOMAIN&lt;/p&gt;

&lt;p&gt;And the storm had one surprising source…&lt;/p&gt;
&lt;h2&gt;
  
  
  🕵️ The Real Breakthrough — It Was One Hostname
&lt;/h2&gt;

&lt;p&gt;When I traced DNS traffic volume by hostname,&lt;br&gt;&lt;br&gt;
The data made me stop.&lt;/p&gt;

&lt;p&gt;It wasn’t many hostnames.&lt;/p&gt;

&lt;p&gt;It wasn’t dozens.&lt;/p&gt;

&lt;p&gt;It was &lt;strong&gt;one&lt;/strong&gt; about from 80% to 90% of the DNS queries are related to only one host.&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%2Frhzjp94d7mt6fhzlo3vv.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%2Frhzjp94d7mt6fhzlo3vv.png" alt="NXDOMAIN vs NOERROR over time for rabbit MQ hostname (Query per second)" width="800" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our RabbitMQ endpoint — the heart of our event-driven system — contained only &lt;strong&gt;four dots&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;rabbitmq.eu-west-1.aws.company.production&lt;/p&gt;

&lt;p&gt;And with Kubernetes default &lt;code&gt;ndots=5&lt;/code&gt;,&lt;br&gt;&lt;br&gt;
This meant the resolver didn’t treat it as a fully qualified domain.&lt;/p&gt;

&lt;p&gt;Instead, Kubernetes expanded it through every search domain in the pod:&lt;/p&gt;

&lt;p&gt;rabbitmq.eu-west-1.aws.company.production.default.svc.cluster.local ❌ NXDOMAIN&lt;br&gt;
rabbitmq.eu-west-1.aws.company.production.svc.cluster.local ❌ NXDOMAIN&lt;br&gt;
rabbitmq.eu-west-1.aws.company.production.cluster.local ❌ NXDOMAIN&lt;br&gt;
rabbitmq.eu-west-1.aws.company.production. ❌ NXDOMAIN&lt;br&gt;
rabbitmq.eu-west-1.aws.company.production ✅ finally correct&lt;/p&gt;

&lt;p&gt;For each attempt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A lookup ❌
&lt;/li&gt;
&lt;li&gt;AAAA lookup ❌
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🟡 &lt;strong&gt;4 to 8 extra DNS queries&lt;/strong&gt; for every single valid lookup&lt;/p&gt;

&lt;p&gt;RabbitMQ is used everywhere — messaging, telemetry, queues, notifications.&lt;br&gt;&lt;br&gt;
So every millisecond meant more queries → more NXDOMAIN → more pressure.&lt;/p&gt;

&lt;p&gt;We weren’t resolving DNS.&lt;/p&gt;

&lt;p&gt;We were &lt;strong&gt;manufacturing DNS traffic&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  ⚡ The One-Character Fix That Saved Us
&lt;/h2&gt;

&lt;p&gt;Under pressure and needing a fast mitigation,&lt;br&gt;&lt;br&gt;
I tried a tiny change that felt almost silly:&lt;/p&gt;

&lt;p&gt;I added a trailing dot to the hostname.&lt;/p&gt;

&lt;p&gt;Just one dot:&lt;/p&gt;

&lt;p&gt;rabbitmq.eu-west-1.aws.company.production.&lt;/p&gt;

&lt;p&gt;That trailing dot tells Linux resolver:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“This is a fully qualified domain.&lt;br&gt;&lt;br&gt;
Do not apply search paths.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The effect was instant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ NXDOMAIN flood dropped immediately
&lt;/li&gt;
&lt;li&gt;💡 CoreDNS CPU reduced by &lt;strong&gt;≈50%&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;⚡ Lookup performance improved ~5x
&lt;/li&gt;
&lt;li&gt;🧘 Zero failures since
&lt;/li&gt;
&lt;li&gt;😊 Developers finally stopped pinging me about DNS issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We didn’t scale DNS.&lt;br&gt;&lt;br&gt;
We didn’t tune CoreDNS.&lt;br&gt;&lt;br&gt;
We didn’t rewrite applications.&lt;/p&gt;

&lt;p&gt;We removed unnecessary work.&lt;/p&gt;

&lt;p&gt;One dot → stability restored.&lt;/p&gt;

&lt;p&gt;We later applied additional DNS optimizations to handle even larger query loads&lt;br&gt;&lt;br&gt;
— more on that in the next article.&lt;/p&gt;
&lt;h2&gt;
  
  
  🔍 The Root Cause: &lt;code&gt;ndots&lt;/code&gt; in &lt;code&gt;/etc/resolv.conf&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Every Kubernetes pod has a resolver config like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;search default.svc.cluster.local svc.cluster.local cluster.local eu-west-1.compute.internal
nameserver 172.20.0.10
options ndots:5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The ndots value controls:&lt;br&gt;
How many dots must exist in a hostname before it is treated as an absolute FQDN.&lt;/p&gt;

&lt;p&gt;If hostname dot-count &amp;lt; ndots → search domains appended&lt;/p&gt;

&lt;p&gt;This Kubernetes default exists to support internal service discovery:&lt;/p&gt;

&lt;p&gt;service → service.default.svc.cluster.local → resolves successfully&lt;br&gt;
But for external hostnames?&lt;/p&gt;

&lt;p&gt;🚩 Disaster waiting to happen.&lt;/p&gt;

&lt;p&gt;🧪 Benchmark — Measured Results&lt;br&gt;
I have used this python script to test the ndots effect&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env python3
import argparse
import asyncio
import time

import dns.asyncresolver


async def main() -&amp;gt; None:
    parser = argparse.ArgumentParser(
        description="Measure DNS lookup time for multiple queries using current resolv.conf (ndots/search)."
    )
    parser.add_argument("host", help="Hostname to resolve (bare name to exercise ndots/search)")
    parser.add_argument(
        "-n",
        "--queries",
        type=int,
        default=100,
        help="Number of concurrent queries to issue (default: 100)",
    )
    parser.add_argument(
        "-t",
        "--timeout",
        type=float,
        default=2.0,
        help="Per-query timeout in seconds (default: 2.0)",
    )
    args = parser.parse_args()

    resolver = dns.asyncresolver.Resolver()  # uses /etc/resolv.conf (ndots/search respected)
    resolver.timeout = args.timeout
    resolver.lifetime = args.timeout
    resolver.use_edns = False

    async def one_query() -&amp;gt; None:
        try:
            await resolver.resolve(args.host, "A", search=True)
        except Exception:
            # Ignore failures; we only care about timing behavior.
            pass

    tasks = [asyncio.create_task(one_query()) for _ in range(args.queries)]
    start = time.monotonic()
    await asyncio.gather(*tasks)
    elapsed = time.monotonic() - start
    print(f"{args.queries} queries for '{args.host}' in {elapsed:.3f}s ({elapsed/args.queries:.4f}s/query)")


if __name__ == "__main__":
    asyncio.run(main())

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python async DNS resolver test:&lt;/p&gt;

&lt;p&gt;Before fix (no trailing dot)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python ndots_async_bench.py rabbitmq.eu-west-1.aws.xxxxx.production -n 100
100 queries for 'rabbitmq.eu-west-1.aws.xxxxx.production' in 2.207s (0.0221s/query) 

python ndots_async_bench.py rabbitmq.eu-west-1.aws.xxxxx.production -n 10
10 queries for 'rabbitmq.eu-west-1.aws.xxxxx.production' in 0.302s (0.0302s/query)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;100 queries → 2.207s (0.0221 s/query)&lt;br&gt;
10 queries → 0.302s (0.0302 s/query)&lt;/p&gt;

&lt;p&gt;After fix (trailing dot → FQDN)&lt;br&gt;
rabbitmq.eu-west-1.aws.company.production.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python ndots_async_bench.py rabbitmqc.eu-west-1.aws.xxxxx.production. -n 100
100 queries for 'rabbitmqc.eu-west-1.aws.xxxxx.production.' in 0.399s (0.0040s/query) 
python ndots_async_bench.py rabbitmqc.eu-west-1.aws.xxxxx.production. -n 10 
10 queries for 'rabbitmqc.eu-west-1.aws.xxxxx.production.' in 0.095s (0.0095s/query)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;100 queries → 0.399s (0.0040 s/query)&lt;br&gt;
10 queries → 0.095s (0.0095 s/query)&lt;br&gt;
🚀 DNS became ~5x faster&lt;br&gt;
🧨 NXDOMAIN traffic dropped nearly in half&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%2F7akg2i1br9p1u9cl1b36.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%2F7akg2i1br9p1u9cl1b36.png" alt="NXDOMAIN vs NOERROR over time (Query per second) after fix for one hostname" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  🛠 Fixing the Problem (Two Options)
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1️⃣ Use Fully Qualified Domain Names with a trailing dot
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;api.company.internal.
googleapis.com.
rabbitmq.eu-west-1.aws.company.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✔ Easiest fix&lt;br&gt;
✔ No Kubernetes changes&lt;br&gt;
✔ Zero search-domain expansion&lt;br&gt;
✔ Best performance&lt;/p&gt;

&lt;h3&gt;
  
  
  2️⃣ Reduce ndots for external workloads
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;spec:
  dnsConfig:
    options:
      - name: ndots
        value: "2"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;AWS docs state:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can reduce the number of requests to CoreDNS by lowering the ndots option of your workload or fully qualifying your domain requests by including a trailing . (e.g. api.example.com. ).&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;Kubernetes Docs&lt;br&gt;
&lt;a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="noopener noreferrer"&gt;https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AWS EKS&lt;br&gt;
&lt;a href="https://docs.aws.amazon.com/eks/latest/best-practices/scale-cluster-services.html#:%7E:text=Reduce%20external%20queries%20by%20lowering%20ndots" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/eks/latest/best-practices/scale-cluster-services.html#:~:text=Reduce%20external%20queries%20by%20lowering%20ndots&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Linux Resolver&lt;br&gt;
&lt;a href="https://man7.org/linux/man-pages/man5/resolv.conf.5.html" rel="noopener noreferrer"&gt;https://man7.org/linux/man-pages/man5/resolv.conf.5.html&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Final Thought
&lt;/h2&gt;

&lt;p&gt;Sometimes the biggest reliability problems&lt;br&gt;
come from the smallest defaults.&lt;/p&gt;

&lt;p&gt;ndots=5 is perfect for Kubernetes internal services…&lt;br&gt;
but for external hostnames it can quietly overwhelm DNS&lt;br&gt;
and drag performance down across the entire cluster.&lt;/p&gt;

&lt;p&gt;One dot fixed everything.&lt;/p&gt;

&lt;p&gt;Fix it once → enjoy peace and performance forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  💬 If you'd like Part 2 (the full debugging journey — how I traced and proved the root cause), comment below:
&lt;/h2&gt;

&lt;p&gt;Show me the debugging story&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>aws</category>
      <category>eks</category>
      <category>dns</category>
    </item>
    <item>
      <title>AWS VPC From Zero to Hero Series: 2, Build, Secure, and Monitor Networks on AWS</title>
      <dc:creator>Ahmed Shendy</dc:creator>
      <pubDate>Fri, 16 Feb 2024 14:25:22 +0000</pubDate>
      <link>https://dev.to/ahmedshendy/aws-vpc-from-zero-to-hero-series-2-build-secure-and-monitor-networks-on-aws-3pp7</link>
      <guid>https://dev.to/ahmedshendy/aws-vpc-from-zero-to-hero-series-2-build-secure-and-monitor-networks-on-aws-3pp7</guid>
      <description>&lt;p&gt;This is a series of hands-on labs that start from beginner level to advanced level to give you a real understanding of AWS VPC.&lt;/p&gt;

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

&lt;p&gt;In this interactive lab, you'll construct and peer three VPCs—labeled A, B, and C to illustrate the escalating complexity of configuration and routing that accompanies the addition of multiple VPCs, gateways, and associated resources. You will then transition the network architecture to a hub-and-spoke design using AWS Transit Gateway. Additionally, you'll set up network monitoring and implement security measures to safeguard your resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topics covered
&lt;/h2&gt;

&lt;p&gt;By the end of this lab, you will be able to do the following:&lt;br&gt;
    • Set up routing between VPCs.&lt;br&gt;
    • Select the appropriate connectivity options for an environment.&lt;br&gt;
    • Capture network traffic information (metadata) with VPC flow logs.&lt;br&gt;
    • Configure monitoring for networking statistics and metrics.&lt;br&gt;
    • Filter network traffic with Network Access Lists (NACLs), and Security Groups (SG).&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;An active AWS account.&lt;/li&gt;
&lt;li&gt;A user that has access to the AWS console with the needed permissions.&lt;/li&gt;
&lt;li&gt; knowledge about basic networking concepts (such as IP Addressing, CIDR notation, and routing), an understanding of basic cloud operations, and familiarity with navigating in the AWS Management Console.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Duration
&lt;/h2&gt;

&lt;p&gt;This lab requires approximately 120 minutes to complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 1: Build a Multi-VPC Architecture
&lt;/h2&gt;

&lt;p&gt;you will provision three logically isolated sections of the AWS Cloud into VPCs. In addition to using multiple VPCs, you will span the environment across multiple Availability zones (AZ) within a Region. After creating these VPCs, you will launch Amazon Elastic Compute Cloud (Amazon EC2) instances into the virtual networks that you define.&lt;br&gt;
Each of the VPCs you create requires an internet gateway (IGW). This is a horizontally scaled, redundant, and highly available VPC component that allows communication between instances in your VPC and the internet. It therefore imposes no availability risks or bandwidth constraints on your network traffic.&lt;br&gt;
You will finish this task by observing that by default, EC2 instances in different VPCs are not able to communicate with each other using private IP addresses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fvvtprfro982df6k7jq5a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fvvtprfro982df6k7jq5a.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TASK 1.1: CREATE THREE VPCS WITH PRIVATE SUBNETS
&lt;/h2&gt;

&lt;p&gt;In this task, you will be creating three VPCs with private subnets. Each VPC will have subnets in two Availability Zones within the Region.&lt;br&gt;
 Table 1. The below table shows IPv4 CIDR allocations for VPCs and AZs&lt;br&gt;
&lt;a href="https://media.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%2Fnm1sy6iclty6qn29hdkc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fnm1sy6iclty6qn29hdkc.png" alt="Table 1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 1.1.1: Create VPCs
&lt;/h3&gt;

&lt;p&gt;Our first step is to create VPCs with non-overlapping CIDR blocks.&lt;br&gt;
&lt;a href="https://media.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%2Fk61b29zm4dhx7vzjk8br.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fk61b29zm4dhx7vzjk8br.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will not create the VPC as we did in &lt;a href="https://dev.to/ahmedshendy/netcraft-the-aws-vpc-adventure-series-adventure-1-35kg"&gt;lab 1&lt;/a&gt; using &lt;strong&gt;VPC and more&lt;/strong&gt; option, In this lab we will use &lt;strong&gt;VPC only&lt;/strong&gt; option to get more control on the created resources.&lt;br&gt;
1- Go to VPC service&lt;br&gt;
2- Choose &lt;strong&gt;Create VPC&lt;/strong&gt; and configure the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fsiituq3jhgg1win5svxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fsiituq3jhgg1win5svxw.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
3- Follow the same steps to create &lt;strong&gt;VPC B&lt;/strong&gt; and &lt;strong&gt;VPC C&lt;/strong&gt;; refer to Table 1.&lt;br&gt;
4- Now we have these 3 VPCs&lt;br&gt;
&lt;a href="https://media.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%2Flnz0cqoxnghekv6ic94q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Flnz0cqoxnghekv6ic94q.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 1.1.2: Create Subnets
&lt;/h3&gt;

&lt;p&gt;For each VPC, we will create two subnets - one per availability zone (AZs name could differ - depending on your chosen region).&lt;br&gt;
&lt;a href="https://media.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%2F440mcpndktgrmhwgnd4l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F440mcpndktgrmhwgnd4l.png" alt="VPC with subnets"&gt;&lt;/a&gt;&lt;br&gt;
5- On the left navigation pane, under  &lt;strong&gt;Virtual private cloud&lt;/strong&gt;, choose &lt;strong&gt;Subnets&lt;/strong&gt;.&lt;br&gt;
6- Choose &lt;strong&gt;Create subnet&lt;/strong&gt; to create subnets for VPC A configure the following:&lt;br&gt;
    • &lt;strong&gt;VPC ID&lt;/strong&gt;: VPC A &lt;br&gt;
&lt;a href="https://media.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%2Fqfnzgyusrcenmx0uit4u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fqfnzgyusrcenmx0uit4u.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
    • &lt;strong&gt;Subnet name&lt;/strong&gt;: VPC A - AZ1&lt;br&gt;
    • &lt;strong&gt;Availability Zone&lt;/strong&gt;: Select the first Availability Zone in the list. (Do not choose No Preference)&lt;br&gt;
    • &lt;strong&gt;IPv4 CIDR block&lt;/strong&gt;: 10.0.0.0/24&lt;br&gt;
    • &lt;strong&gt;Tags&lt;/strong&gt;: Accept proposed Tags&lt;br&gt;
&lt;a href="https://media.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%2Fpw8ukdzncaeqg6yhrkpr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fpw8ukdzncaeqg6yhrkpr.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7- Choose &lt;strong&gt;Add new subnet&lt;/strong&gt; to add Subnet 2 of 2 into AZ2 and configure the following:&lt;br&gt;
    • &lt;strong&gt;Subnet name&lt;/strong&gt;: VPC A - AZ2&lt;br&gt;
    • Availability Zone: Select the second Availability Zone in the list. (Do not choose No Preference)&lt;br&gt;
    • &lt;strong&gt;IPv4 CIDR block&lt;/strong&gt;: 10.0.1.0/24&lt;br&gt;
    • &lt;strong&gt;Tags&lt;/strong&gt;: Accept proposed Tags.&lt;br&gt;
&lt;a href="https://media.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%2Fnm238qte0ttdoqvjujkj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fnm238qte0ttdoqvjujkj.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
8- Choose Create subnet.&lt;br&gt;
&lt;a href="https://media.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%2Fdsp2jcpr5bf5eu5d5jpp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fdsp2jcpr5bf5eu5d5jpp.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;9- Repeat the steps above to create subnets for VPC B and VPC C; refer to the below table for copying subnet name and subnet CIDR allocations.&lt;br&gt;
&lt;a href="https://media.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%2Fjplfii5g6w9wpy3jk5w9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fjplfii5g6w9wpy3jk5w9.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
After you finish the task, six new subnets should be available.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F630dz787bn88df8yb3sn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F630dz787bn88df8yb3sn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 1.1.3: Deploy Internet Gateways
&lt;/h3&gt;

&lt;p&gt;In this section, you will deploy one Internet Gateway (IGW) per VPC. You need an Internet Gateway to establish outside connectivity to EC2 instances in VPCs.&lt;br&gt;
10- On the left navigation pane, under  &lt;strong&gt;Virtual private cloud&lt;/strong&gt;, choose &lt;strong&gt;Internet gateways&lt;/strong&gt;.&lt;br&gt;
11- Choose &lt;strong&gt;Create internet gateway&lt;/strong&gt; and configure the following:&lt;br&gt;
    • Name tag: VPC A - IGW&lt;br&gt;
    • Tags: Accept proposed Tags&lt;br&gt;
&lt;a href="https://media.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%2Fui27n6y1tlniji3dm8b9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fui27n6y1tlniji3dm8b9.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
12- Choose &lt;strong&gt;Create internet gateway&lt;/strong&gt;.&lt;br&gt;
13- From &lt;strong&gt;Actions&lt;/strong&gt; Select &lt;strong&gt;Attach to a VPC&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.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%2Fx5wk504hnrn48kkxe22r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fx5wk504hnrn48kkxe22r.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
14- For Available VPCs, choose VPC A.&lt;br&gt;
&lt;a href="https://media.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%2Fojnajiisyqwy6ranvhxk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fojnajiisyqwy6ranvhxk.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
15- Choose &lt;strong&gt;Attach internet gateway&lt;/strong&gt;.&lt;br&gt;
16- Repeat the above steps to create and attach IGWs &lt;br&gt;
VPC B - IGW to VPC B and &lt;br&gt;
VPC C - IGW to VPC C.&lt;br&gt;
 You should now have an IGW for the default VPC and three newly created IGWs available.&lt;br&gt;
&lt;a href="https://media.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%2Ffje41bnpnm1ltyg5tlel.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ffje41bnpnm1ltyg5tlel.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 1.1.4: Update Routing Tables
&lt;/h3&gt;

&lt;p&gt;To utilize newly created Internet Gateways, you need to update VPC routing tables to point the default routes to these IGWs.&lt;br&gt;
17- On the left navigation pane, under  &lt;strong&gt;Virtual private cloud&lt;/strong&gt;, choose &lt;strong&gt;Route tables&lt;/strong&gt;.&lt;br&gt;
 Please make sure that you &lt;strong&gt;DO NOT&lt;/strong&gt; create a new Route table. Please follow the next steps to rename the existing Main Route table.&lt;br&gt;
18- Select the Route table that belongs to VPC A.&lt;br&gt;
&lt;a href="https://media.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%2Ffy8518eiln8ozqrde2xo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ffy8518eiln8ozqrde2xo.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
19- Edit the name to be: VPC A Route Table&lt;br&gt;
&lt;a href="https://media.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%2F6akra55mw4h8bl3yiasn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F6akra55mw4h8bl3yiasn.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
20- Make the same for the other 2 route tables&lt;br&gt;
21- Select  &lt;strong&gt;VPC A Route Table&lt;/strong&gt;.&lt;br&gt;
22- Choose the &lt;strong&gt;Routes&lt;/strong&gt; tab in the lower half of the page.&lt;br&gt;
&lt;a href="https://media.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%2F0m2t5bin9xhydzkhy5k1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F0m2t5bin9xhydzkhy5k1.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
 There is one route in your route table that allows traffic within the 10.0.0.0/16 network to flow within the network, but it does not route traffic outside of the network.&lt;br&gt;
23- Choose &lt;strong&gt;Edit routes&lt;/strong&gt;.&lt;br&gt;
24- Choose Add route and then configure the following:&lt;br&gt;
&lt;a href="https://media.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%2Fef9phfbabf5ow5cxrpp6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fef9phfbabf5ow5cxrpp6.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
25- Choose &lt;strong&gt;Save changes&lt;/strong&gt;.&lt;br&gt;
26- Repeat the above steps to add the default route 0.0.0.0/0 to the Route tables&lt;br&gt;
VPC B Route Table for VPC B and &lt;br&gt;
VPC C Route Table for VPC C.&lt;/p&gt;

&lt;h2&gt;
  
  
  TASK 1.2: DEPLOY EC2 INSTANCES IN VPC’S
&lt;/h2&gt;

&lt;p&gt;You will deploy one EC2 instance per VPC and demonstrate that, by default, VPCs provide network isolation. The EC2 instances should not be able to reach each other using ping (a common diagnostic tool) before the next task is completed.&lt;br&gt;
27- At the top of the AWS Management Console, to the right of the Services menu, in the search bar, search for &lt;strong&gt;EC2&lt;/strong&gt; and then choose &lt;strong&gt;EC2&lt;/strong&gt; from the list.&lt;br&gt;
&lt;a href="https://media.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%2Fak2o439xwdwt5n7justm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fak2o439xwdwt5n7justm.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
28- On the left navigation pane, choose &lt;strong&gt;Instances&lt;/strong&gt;.&lt;br&gt;
29- Choose &lt;strong&gt;Launch instances&lt;/strong&gt; and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name and tags: Under Name, enter EC2 VPC A - AZ1
&lt;img src="https://media.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%2F86ynwehz2gqgw5nn6fz1.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;li&gt;Application and OS Images (Amazon Machine Image):
-- Quick Start: Select Amazon Linux
    ○ Amazon Machine Image (AMI): Amazon Linux 2 AMI (HVM), SSD Volume Type
    ○ Architecture: 64-bit (x86) 
&lt;img src="https://media.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%2F718i49h5rjwn60u41dug.png" alt="Image description"&gt;
•  Instance type: t2.micro 
•  Key pair (login): Proceed without a key pair (Not recommended) 
You will use SSM session Manager to access the shell running on the EC2, so a key pair is not needed in the lab.
30- Scroll down to  Network settings, choose &lt;strong&gt;Edit&lt;/strong&gt;, and configure the following:
• VPC - required: VPC A 
• Subnet: VPC A - AZ1 
• Auto-assign public IP: Enable 
• Firewall (security groups):
    ○ Choose  Create security group
    ○ Security group name - required: VPC A EC2 Security Group
    ○ Description - required: Allow ICMP Traffic
• Inbound security groups rules:
    ○ Type: Select All ICMP - IPv4 from the dropdown instead of SSH
    ○ Source type: Custom 
    ○ Source: 10.0.0.0/8
It is not a best practice to have wide open Security groups that allow anyone/everyone such as 0.0.0.0/0, to limit access to only what is required.
&lt;img src="https://media.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%2Fhy0aete7r5cihijkcx9f.png" alt="Image description"&gt;
31- Scroll down to  &lt;strong&gt;Advanced details&lt;/strong&gt; and configure the following:
• IAM instance profile: From the drop-down list, select  &lt;strong&gt;AmazonSSMRoleForInstancesQuickSetup&lt;/strong&gt;
&lt;img src="https://media.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%2Fnnp4wxo3p4hcfd6uym26.png" alt="Image description"&gt;
32- Choose &lt;strong&gt;Launch instance&lt;/strong&gt;.
33- Choose &lt;strong&gt;View all instances&lt;/strong&gt; to display all the instances launched.
34- Occasionally choose the console refresh button and wait for Public Instance to display the Instance state as  Running and wait for Status check to pass  2/2 checks passed.
The Amazon EC2 instance named Public Instance is initially in a Pending state. The instance state then changes to Running indicating that the instance has finished booting.
&lt;img src="https://media.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%2Ffjpdka0c9go6wc9sr5tj.png" alt="Image description"&gt;
35- Launch 2 more EC2 instances and assign them names accordingly:
i. Second EC2 instance in VPC B with the following configuration
• Name and tags: EC2 VPC B - AZ1
• Network settings:
    ○ VPC - required: VPC B 
    ○ Subnet: VPC B - AZ1 
• Firewall (security groups):
    ○ Security group name - required: VPC B EC2 Security Group
    ○ Description - required: Allow ICMP Traffic
Except for the above details, keep all other configurations same as first EC2 instance.
ii. Third EC2 instance in VPC C with the following configuration
• Name and tags: EC2 VPC C - AZ1
•  Network settings:
    ○ VPC - required: VPC C 
    ○ Subnet: VPC C - AZ1 
• Firewall (security groups):
    ○ Security group name - required: VPC C EC2 Security Group
    ○ Description - required: Allow ICMP Traffic
Except for the above details, keep all other configurations same as first EC2 instance.
For all EC2 instances, update the Security Group rules under the Security tab to allow ICMP traffic. There is no need to have a rule for SSH since SSM Session Manager will be used to connect to the terminal.
After a few minutes, you should now have 3 EC2 instances in the  Running state.
36- Copy the  Private IPv4 addresses assigned to EC2 instances by choosing an Instance and navigating to the Details tab.
37- Copy the following table with IP information to your favorite notepad tool, and populate the private IP addresses that you copied in the previous step.
Table 2. Populate the following table with EC2 instances' private IP Addresses:
&lt;img src="https://media.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%2F8et9lue06ho3vxtfmdw4.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TASK 1.3: TEST INTER-VPC COMMUNICATION BETWEEN EC2 INSTANCES
&lt;/h2&gt;

&lt;p&gt;Now that the EC2 instances are available in each VPC, you will use ping (a common diagnostic tool) to verify that the instances cannot communicate demonstrating how VPCs provide isolation.&lt;/p&gt;

&lt;p&gt;38- At the top of the AWS Management Console, to the right of the Services menu, in the search bar, search for EC2 and then choose EC2 from the list.&lt;br&gt;
39- On the left navigation pane, choose Instances.&lt;br&gt;
40- Select the  EC2 VPC A - AZ1 instance.&lt;br&gt;
41- Choose &lt;strong&gt;Connect&lt;/strong&gt; from the navigation bar.&lt;br&gt;
&lt;a href="https://media.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%2Fbc4v4gd9oz97nmy580nq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fbc4v4gd9oz97nmy580nq.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
42- With &lt;strong&gt;Session Manager&lt;/strong&gt; tab selected, choose &lt;strong&gt;Connect&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.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%2Fnpsdj0mqcc3i5l7pjlp0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fnpsdj0mqcc3i5l7pjlp0.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
A terminal session should open in a new browser tab.&lt;br&gt;
43- From the EC2 VPC A - AZ1 instance in VPC A, try pinging the private IP addresses of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 VPC B - AZ1 instance in VPC B and&lt;/li&gt;
&lt;li&gt;EC2 VPC C - AZ1 instance in VPC C.
Check if those addresses are pingable.
ping 10.1.0.x
Refer to Table 2. for the private IP addresses of the instances.
&lt;img src="https://media.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%2Fwwfl5kdkl9sv9c6sn1zy.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TASK 1.4: SETUP VPC PEERING
&lt;/h2&gt;

&lt;p&gt;The end of the previous task demonstrated that EC2 instances in different VPCs cannot reach each other on their private IP addresses. but, we want to ensure that all the traffic between VPCs is on the AWS Backbone, and not traversing the internet. You will achieve this using VPC peering. VPC Peering is a connection between two VPCs that enables you to route your traffic between them.&lt;br&gt;
In this task, you will establish VPC peering links between VPC A and VPC B, as well as VPC A and VPC C. Note that all three VPCs have non-overlapping CIDRS. You cannot create a VPC peering connection between VPCs with matching or overlapping IPv4 CIDR blocks.&lt;br&gt;
&lt;a href="https://media.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%2Fp59vibv13alyidm5n5i0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fp59vibv13alyidm5n5i0.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;44- At the top of the AWS Management Console, to the right of the Services menu, in the search bar, search for &lt;strong&gt;VPC&lt;/strong&gt; and then choose VPC from the list.&lt;/p&gt;

&lt;p&gt;45- On the left navigation pane, under  &lt;strong&gt;Virtual private cloud&lt;/strong&gt;, choose &lt;strong&gt;Peering connections&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;46- Choose &lt;strong&gt;Create peering connection&lt;/strong&gt; and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name: VPC A &amp;lt;-&amp;gt; VPC B&lt;/li&gt;
&lt;li&gt;VPC ID (Requester): VPC A &lt;/li&gt;
&lt;li&gt;Account:  My account&lt;/li&gt;
&lt;li&gt;Region:  This Region (xx-xxxx-x) Make sure the region labeled AWSRegion in the left side of the instructions matches with the region where you are creating the VPC Peering connection.&lt;/li&gt;
&lt;li&gt;VPC ID (Accepter): VPC B &lt;/li&gt;
&lt;li&gt;Tags: Accept proposed Tags
&lt;img src="https://media.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%2Fd6ur9e9fu4wgr76kp61n.png" alt="Image description"&gt;
47- Choose &lt;strong&gt;Create peering connection&lt;/strong&gt;.
The status transitions through Initiating Request to Pending Acceptance.
48- From the &lt;strong&gt;Actions&lt;/strong&gt; button, choose &lt;strong&gt;Accept request&lt;/strong&gt;.
&lt;img src="https://media.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%2Fk8xk0gtxh8mv4oenagfx.png" alt="Image description"&gt;
49- Choose &lt;strong&gt;Accept request&lt;/strong&gt;.
50- Repeat the above steps to create VPC A &amp;lt;-&amp;gt; VPC C peering connection with the following configuration:&lt;/li&gt;
&lt;li&gt;Name: VPC A &amp;lt;-&amp;gt; VPC C&lt;/li&gt;
&lt;li&gt;VPC ID (Requester): VPC A &lt;/li&gt;
&lt;li&gt;Account:  My account&lt;/li&gt;
&lt;li&gt;Region:  This Region (xx-xxxx-x)&lt;/li&gt;
&lt;li&gt;VPC ID (Accepter): VPC C &lt;/li&gt;
&lt;li&gt;Tags: Accept proposed Tags
You should now have two active peering connections.
&lt;img src="https://media.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%2Fmohbench6vewbf8lkp6x.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Task 1.4.1: Update Route Tables for VPCs
&lt;/h3&gt;

&lt;p&gt;51- On the left navigation pane, under  &lt;strong&gt;Virtual private cloud&lt;/strong&gt;, choose &lt;strong&gt;Route Tables&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  A. Update Route Table for VPC A
&lt;/h4&gt;

&lt;p&gt;52- Select  &lt;strong&gt;VPC A Route Table&lt;/strong&gt;.&lt;br&gt;
53- Choose &lt;strong&gt;Routes&lt;/strong&gt; tab.&lt;br&gt;
54- Choose &lt;em&gt;Edit routes&lt;/em&gt;.&lt;br&gt;
55- Choose Add route to add VPC B CIDR in Destination to enable VPC A to reach VPC B through the VPC peering connection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Destination: 10.1.0.0/16&lt;/li&gt;
&lt;li&gt;Target: Choose Peering Connection from drop-down list&lt;/li&gt;
&lt;li&gt;Select pcx-xxxxxxxxxx (VPC A &amp;lt;-&amp;gt; VPC B)  from the drop-down list &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;56- Choose Add route to add VPC C CIDR in Destination to enable VPC A to reach VPC C through the VPC peering connection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Destination: 10.2.0.0/16&lt;/li&gt;
&lt;li&gt;Target: Choose Peering Connection from drop-down list&lt;/li&gt;
&lt;li&gt;Select pcx-yyyyyyyyyy (VPC A &amp;lt;-&amp;gt; VPC C)  from the drop-down list
&lt;img src="https://media.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%2Fzb1s64n7l39klutsslxr.png" alt="Image description"&gt;
57- Choose &lt;strong&gt;Save changes&lt;/strong&gt;.
#### B. Update Route Tables for VPC B&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;58- On the left navigation pane, under  Virtual private cloud, choose Route tables.&lt;br&gt;
59- Select  VPC B Route Table.&lt;br&gt;
60- Choose Routes tab.&lt;br&gt;
61- Choose Edit routes .&lt;br&gt;
62- Choose Add route to add VPC A CIDR in Destination to enable VPC B to reach VPC A through the VPC peering connection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Destination: 10.0.0.0/16&lt;/li&gt;
&lt;li&gt;Target: Choose Peering Connection from drop-down list&lt;/li&gt;
&lt;li&gt;Select pcx-xxxxxxxxxx (VPC A &amp;lt;-&amp;gt; VPC B)  from the drop-down list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fm24eii018d9x8y177svj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fm24eii018d9x8y177svj.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
63- Choose &lt;strong&gt;Save changes&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  C. Update Route Table for VPC C
&lt;/h4&gt;

&lt;p&gt;64- On the left navigation pane, under  Virtual private cloud, choose Route tables.&lt;br&gt;
65- Select  VPC C Route Table.&lt;br&gt;
66- Choose Routes tab.&lt;br&gt;
67- Choose Edit &lt;strong&gt;routes&lt;/strong&gt;.&lt;br&gt;
68- Choose Add route to add VPC A CIDR in Destination to enable VPC C to reach VPC A through the VPC peering connection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Destination: 10.0.0.0/16&lt;/li&gt;
&lt;li&gt;Target: Choose Peering Connection from drop-down list&lt;/li&gt;
&lt;li&gt;Select pcx-yyyyyyyyyy (VPC A &amp;lt;-&amp;gt; VPC C)  from the drop-down list
&lt;img src="https://media.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%2F34qkjabblwqqjeywj7tq.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;69- Choose &lt;strong&gt;Save changes&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  D. Check EC2 connectivity in VPC A
&lt;/h4&gt;

&lt;p&gt;70- At the top of the AWS Management Console, to the right of the Services menu, search for &lt;strong&gt;EC2&lt;/strong&gt; in the search bar and then choose EC2 from the list.&lt;br&gt;
71- On the left navigation pane, choose &lt;strong&gt;Instances&lt;/strong&gt;.&lt;br&gt;
72- Select the  EC2 VPC A - AZ1 instance.&lt;br&gt;
73- Choose Connect from the navigation bar.&lt;br&gt;
74- With the Session Manager tab selected, choose &lt;strong&gt;Connect&lt;/strong&gt;.&lt;br&gt;
If peering and routing are configured correctly, you can ping both instances.&lt;br&gt;
&lt;a href="https://media.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%2F2soz3glme5htw6km28r3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F2soz3glme5htw6km28r3.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
75- Select the  EC2 VPC B - AZ1 instance.&lt;br&gt;
76- Choose Connect from the navigation bar.&lt;br&gt;
77- With the Session Manager tab selected, choose &lt;strong&gt;Connect&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.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%2Fyb60joazg1llcxmx72v1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fyb60joazg1llcxmx72v1.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the above image, you can find that &lt;strong&gt;EC2 VPC B - AZ1&lt;/strong&gt; ping to EC2 inside VPC A, but can't pint to EC2 inside VPC C, this is due that there is a peering between VPC B and VPC A, but there is no peering between VPC B and VPC C.&lt;/p&gt;

&lt;h2&gt;
  
  
  TASK 1.5: SIMPLIFY ROUTING USING AWS TRANSIT GATEWAY
&lt;/h2&gt;

&lt;p&gt;In the previous section, you created VPC Peering Links to facilitate connectivity between the VPCs, without sending that traffic over the public internet. While this approach can be used to interconnect many VPCs, managing many point-to-point connections can be cumbersome as the number of VPCs you connect grows. A more scalable approach is to utilize AWS Transit Gateway.&lt;br&gt;
In this task, you will remove point-to-point peering connections between &lt;strong&gt;VPC A&lt;/strong&gt; and &lt;strong&gt;VPC B&lt;/strong&gt;; &lt;strong&gt;VPC A&lt;/strong&gt; and &lt;strong&gt;VPC C&lt;/strong&gt;. You will set up Transit Gateway (TGW) and use it to interconnect VPC A, VPC B, and VPC C.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fpknvrlqcs9dfqiu16xvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fpknvrlqcs9dfqiu16xvt.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 1.5.1: Delete VPC Peering Connections
&lt;/h3&gt;

&lt;p&gt;78- At the top of the AWS Management Console, to the right of the Services menu, in the search bar, search for VPC and then choose VPC from the list.&lt;br&gt;
79- On the left navigation pane, under  &lt;strong&gt;Virtual private cloud&lt;/strong&gt;, choose &lt;strong&gt;Peering connections&lt;/strong&gt;.&lt;br&gt;
80- Select  VPC A &amp;lt;-&amp;gt; VPC B peering connection.&lt;br&gt;
81- From the Actions button, choose Delete peering connection.&lt;br&gt;
82- Select the option to  Delete related route table entries to avoid traffic blackholing scenarios.&lt;br&gt;
83- To confirm deletion, type &lt;em&gt;delete&lt;/em&gt; in the field: delete.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fabw758v2awd7sbu1m7tv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fabw758v2awd7sbu1m7tv.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
84- Choose &lt;strong&gt;Delete&lt;/strong&gt;.&lt;br&gt;
85- Repeat the above steps to delete VPC A &amp;lt;-&amp;gt; VPC C peering connection.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 1.5.2: Setup Transit Gateway
&lt;/h3&gt;

&lt;h4&gt;
  
  
  A. Create Transit Gateway
&lt;/h4&gt;

&lt;p&gt;86- On the left navigation pane, under  &lt;strong&gt;Transit gateways&lt;/strong&gt;, choose &lt;strong&gt;Transit gateways&lt;/strong&gt;.&lt;br&gt;
87- Choose &lt;strong&gt;Create transit gateway&lt;/strong&gt; and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name tag: TGW&lt;/li&gt;
&lt;li&gt;Description: Lab Transit Gateway TGW&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon side Autonomous System Number (ASN): 64512&lt;br&gt;
The Amazon side ASN or Multicast support cannot be changed after the transit gateway is created.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS support:  enable&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VPN ECMP support:  enable&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Default route table association:  enable&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Default route table propagation:  enable&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multicast support:  enable&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keep the default settings for the rest of the parameters&lt;br&gt;
88- Choose &lt;strong&gt;Create transit gateway&lt;/strong&gt;.&lt;br&gt;
A few moments later, TGW will transition from Pending to  Available state.&lt;br&gt;
&lt;a href="https://media.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%2Fec81gve3uf2uynytivq5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fec81gve3uf2uynytivq5.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  B. Create Transit Gateway attachments subnets
&lt;/h4&gt;

&lt;p&gt;According to best practices, it is recommended to use a separate small /28 subnet for each transit gateway VPC attachment.&lt;br&gt;
Table 3. The below table shows IPv4 CIDR allocations for all Subnets in all the VPCs.&lt;br&gt;
&lt;a href="https://media.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%2Fajg0r18n239d5a74fkl2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fajg0r18n239d5a74fkl2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The availability zones in the above table are shown as an example. Please use the availability zones from the region where your lab is deployed.&lt;/p&gt;

&lt;p&gt;89- On the left navigation pane, under  Virtual private cloud, choose Subnets.&lt;br&gt;
90- Choose Create subnet and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC ID: VPC A &lt;/li&gt;
&lt;li&gt;Subnet name: Create subnets with names that reflect VPC and AZ placement, such as VPC A - AZ1 TGW&lt;/li&gt;
&lt;li&gt;Availability Zone: Select the first Availability Zone in the list. (Do not choose No Preference)&lt;/li&gt;
&lt;li&gt;IPv4 CIDR block: 10.0.2.0/28&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tags: Accept proposed Tags&lt;br&gt;
91- se Add new subnet and configure the following:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Subnet name: Create subnets with names that reflect VPC and AZ placement, such as VPC A - AZ2 TGW&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Availability Zone: Select the second Availability Zone in the list. (Do not choose No Preference)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IPv4 CIDR block: 10.0.3.0/28&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tags: Accept proposed Tags&lt;br&gt;
92- Choose &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;br&gt;
93- Repeat the steps above to create subnets for VPC B and VPC C; refer to Table 3. above for CIDR allocations.&lt;br&gt;
After you finish the task, six new Transit Gateway attachment subnets should be available.&lt;br&gt;
&lt;a href="https://media.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%2Fgxn7vvmqymtm2open9ph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fgxn7vvmqymtm2open9ph.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  C. Create Transit Gateway attachments
&lt;/h4&gt;

&lt;p&gt;94- On the left navigation pane, under  Transit gateways, choose Transit gateway attachments.&lt;br&gt;
95- Choose &lt;strong&gt;Create transit gateway&lt;/strong&gt; attachment and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name tag: VPC A Attachment&lt;/li&gt;
&lt;li&gt;Transit Gateway ID: TGW &lt;/li&gt;
&lt;li&gt;Attachment type: VPC &lt;/li&gt;
&lt;li&gt;VPC ID: VPC A&lt;/li&gt;
&lt;li&gt;Subnet IDs: Choose both subnets from the drop-down list:

&lt;ul&gt;
&lt;li&gt;VPC A - AZ1 TGW&lt;/li&gt;
&lt;li&gt;VPC A - AZ2 TGW
&lt;img src="https://media.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%2Frzp24g6pkiu07wwg7jyh.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;96- Choose Create transit gateway attachment .&lt;br&gt;
97- Repeat these steps to create attachments &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC B Attachment for VPC B &lt;/li&gt;
&lt;li&gt;VPC C Attachment for VPC C
Upon completion, you should see three Transit Gateway attachments.
&lt;img src="https://media.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%2Fkvuiu6wqrknctntoupu7.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Task 1.5.3: Check Transit Gateway route table
&lt;/h4&gt;

&lt;p&gt;98- On the left navigation pane, under  Transit gateways, choose Transit gateway route tables.&lt;br&gt;
99- Select the route table you see with the route table ID starting with  tgw-rtb-xxxxxxxxxxxxxx.&lt;br&gt;
100- Choose the Routes tab in the lower half of the page.&lt;br&gt;
Your routing table should be populated with VPC A, VPC B, VPC C routes.&lt;br&gt;
&lt;a href="https://media.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%2Fg2dodtotkhyqnxljzcs0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fg2dodtotkhyqnxljzcs0.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Task 1.5.4: Update Route Tables of VPCs
&lt;/h4&gt;

&lt;p&gt;101- On the left navigation pane, under  Virtual private cloud, choose Route tables.&lt;br&gt;
102- Select  VPC A Route Table.&lt;br&gt;
103- Choose Routes tab.&lt;br&gt;
104- Choose Edit routes .&lt;br&gt;
105- Choose Add route and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Destination: Enter 10.0.0.0/8&lt;/li&gt;
&lt;li&gt;Target: Choose Transit Gateway from the drop-down list and then choose the displayed Transit Gateway ID.
You can do this because the existing local route for VPC A (10.0.0.0/16) is more specific and therefore, any traffic for 10.0.0.0/16 will traverse the more specific local route to the VPC. Anything other traffic for 10.0.0.0/8 will traverse the less specific route (10.0.0.0/8) to the transit gateway.
&lt;img src="https://media.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%2F84y55r0ckmdrlfxfvcp3.png" alt="Image description"&gt;
106- Choose Save changes .
107- Repeat these steps to create 10.0.0.0/8 route pointing to the TGW Transit Gateway in VPC B Route Table and VPC C Route Table Routing tables.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TASK 1.6: CHECK CONNECTIVITY BETWEEN VPCS USING THE TGW
&lt;/h3&gt;

&lt;p&gt;Now connect to any EC2 as we did before and try to ping to the other 2 EC2s, it will work from any EC2 to other EC2s&lt;br&gt;
&lt;a href="https://media.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%2Fdobjyudccnh1kzxkj0k9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fdobjyudccnh1kzxkj0k9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 2: Configure Network Monitoring
&lt;/h2&gt;

&lt;p&gt;In this task, you will set up a way to log network traffic using VPC Flow logs. You will also use Amazon CloudWatch to monitor and alarm based on predetermined conditions. Finally, you will explore dashboards where you can customize your experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Ff4242xlw57218d38mxmq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ff4242xlw57218d38mxmq.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
You will utilize the three VPCs with Internet Gateways, Transit Gateway, and EC2 instances that were created in task 1. You will set up VPC Flow logs for VPC A, generate some traffic, and then view the logs in CloudWatch.&lt;/p&gt;

&lt;h3&gt;
  
  
  TASK 2.1: CREATE VPC FLOW LOGS
&lt;/h3&gt;

&lt;p&gt;VPC Flow Logs is a feature that enables you to capture information (metadata) about the IP traffic going to and from network interfaces in your VPC. For example, if you have a content delivery platform, flow logs can profile, analyze, and predict customer patterns of the content access, and track down top talkers and malicious calls.&lt;br&gt;
In this task, you will create a flow log for all traffic in VPC A and save it to the destination log group VPCFlowLog.&lt;/p&gt;

&lt;h4&gt;
  
  
  Task 2.1.1: Create CloudWatch Log group
&lt;/h4&gt;

&lt;p&gt;108- At the top of the AWS Management Console, to the right of the Services menu, in the search bar, search for &lt;strong&gt;CloudWatch&lt;/strong&gt; and then choose CloudWatch from the list.&lt;/p&gt;

&lt;p&gt;109- On the left navigation pane, under  Logs, choose &lt;strong&gt;Log groups&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;110- Choose Create log group and configure the following:&lt;br&gt;
&lt;a href="https://media.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%2Fedbe91e41rd3wacjo1w4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fedbe91e41rd3wacjo1w4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;111- Choose &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 2.1.2: Create Create an IAM role for flow logs
&lt;/h3&gt;

&lt;p&gt;112- At the top of the AWS Management Console, to the right of the Services menu, in the search bar, search for &lt;strong&gt;IAM&lt;/strong&gt; and then choose IAM from the list.&lt;br&gt;
113- On the left navigation pane, under  &lt;strong&gt;Access management&lt;/strong&gt;, choose &lt;strong&gt;Policies&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.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%2F1b53dhhsymf82epzq83l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F1b53dhhsymf82epzq83l.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
114- Choose &lt;strong&gt;Create policy&lt;/strong&gt; group and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chose &lt;strong&gt;JSON&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;replace the content with this json
&lt;code&gt;{
"Version": "2012-10-17",
"Statement": [
{
  "Effect": "Allow",
  "Action": [
    "logs:CreateLogGroup",
    "logs:CreateLogStream",
    "logs:PutLogEvents",
    "logs:DescribeLogGroups",
    "logs:DescribeLogStreams"
  ],
  "Resource": "*"
}
]
}&lt;/code&gt;
&lt;img src="https://media.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%2Fs5f8c4k0fgwyza0u6bfs.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;115- Choose Next.&lt;br&gt;
116- Enter &lt;strong&gt;Policy name&lt;/strong&gt;: VPCFlowLogPolicy&lt;br&gt;
117- Choose Create policy&lt;/p&gt;

&lt;p&gt;118- On the left navigation pane, under  &lt;strong&gt;Access management&lt;/strong&gt;, choose &lt;strong&gt;Roles&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.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%2Ffj4v7544or0wad2i25ux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ffj4v7544or0wad2i25ux.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
119- Choose &lt;strong&gt;Create role&lt;/strong&gt; group and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trusted entity type: Custom trust policy. &lt;/li&gt;
&lt;li&gt;Custom trust policy: replace "Principal": {}, with the following.
&lt;code&gt;"Principal": {
"Service": "vpc-flow-logs.amazonaws.com"
},&lt;/code&gt;
&lt;img src="https://media.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%2Fkvh0cpcuw0g0qnz4ld13.png" alt="Image description"&gt;
120- Choose &lt;strong&gt;Next&lt;/strong&gt;
121- In Add permissions select the &lt;strong&gt;VPCFlowLogPolicy&lt;/strong&gt;
&lt;img src="https://media.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%2Fjt2v8s1xj2peenh5g6gd.png" alt="Image description"&gt;
122- Choose &lt;strong&gt;Next&lt;/strong&gt;
123- Enter &lt;strong&gt;Role name&lt;/strong&gt;: VPCFlowLogRole
124- Choose &lt;strong&gt;Create&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Task 2.1.3: Create VPC Flow log
&lt;/h3&gt;

&lt;p&gt;112- Go to VPC A&lt;br&gt;
113- From &lt;strong&gt;Actions&lt;/strong&gt;  and choose &lt;em&gt;Create flow log&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.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%2F9eowaolt6bdoeyitxiyd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F9eowaolt6bdoeyitxiyd.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
114- On the Create flow log page, under Flow log settings, configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filter:  All&lt;/li&gt;
&lt;li&gt;Maximum aggregation interval:  1 minute&lt;/li&gt;
&lt;li&gt;Destination:  Send to CloudWatch Logs&lt;/li&gt;
&lt;li&gt;Destination log group: VPCFlowLog&lt;/li&gt;
&lt;li&gt;IAM role: VPCFlowLogRole&lt;/li&gt;
&lt;li&gt;Log record format:  AWS default format
114- Choose &lt;strong&gt;Create flow log&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.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%2F007l8vghrzw9rt1lm9u2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F007l8vghrzw9rt1lm9u2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  TASK 2.2: GENERATE NETWORK TRAFFIC BETWEEN VPCS
&lt;/h3&gt;

&lt;p&gt;IP traffic going to and from network interfaces in VPC A is now being collected in through VPC Flow Logs and stored using an Amazon CloudWatch Log Group. You need to verify that your monitoring is setup properly. To accomplish this, you will generate some traffic between the Amazon EC2 instance in &lt;/p&gt;

&lt;p&gt;VPC A&lt;br&gt;
 (EC2 VPC A – AZ1), and instance in &lt;/p&gt;

&lt;p&gt;VPC B&lt;br&gt;
 (EC2 VPC B – AZ1) using &lt;/p&gt;

&lt;p&gt;iperf&lt;br&gt;
 (a widely used tool for network performance measurement and tuning).&lt;/p&gt;

&lt;h4&gt;
  
  
  Task 2.2.1: Update Security Group for EC2 instance in VPC B
&lt;/h4&gt;

&lt;p&gt;First, you will have to update the Security Group for the Amazon EC2 instance in VPC B to allow the iperf server to receive incoming traffic.&lt;br&gt;
115- Go to &lt;strong&gt;EC2 VPC B - AZ1&lt;/strong&gt;, and choose &lt;strong&gt;Security&lt;/strong&gt; tab&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fuexv1i5hkr8xcuiceem5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fuexv1i5hkr8xcuiceem5.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
116- Choose on the Security Group with ID starting with sg- (VPC B EC2 Security Group) in the lower pane to view and edit its rules.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F12bgo113rk9e5fsezhvn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F12bgo113rk9e5fsezhvn.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
117- On VPC B EC2 Security Group Security Group page, at the bottom of the page, choose the Inbound rules tab.&lt;br&gt;
118- At the right side of the Inbound rules section, choose Edit inbound rules .&lt;/p&gt;

&lt;p&gt;119- On the Edit inbound rules page, choose Add rule and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type: Custom TCP &lt;/li&gt;
&lt;li&gt;Port range: 5201&lt;/li&gt;
&lt;li&gt;Source type: Custom &lt;/li&gt;
&lt;li&gt;Source: 10.0.0.0/16
You added a rule to allow traffic on TCP port 5201 from the Amazon EC2 instance in VPC A by allowing the VPC CIDR 10.0.0.0/16 in the source.
120- Choose &lt;strong&gt;Save rules&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Task 2.2.2: Install and run iperf3 server on EC2 instance in VPC B
&lt;/h4&gt;

&lt;p&gt;121- Connect to &lt;strong&gt;EC2 VPC B - AZ1&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2F455j09z6o6q1k65iehcu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F455j09z6o6q1k65iehcu.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;122- Enter the following command to install iperf:&lt;br&gt;
&lt;code&gt;sudo yum install iperf3 -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;123-  Enter the following command to start the iperf server on the EC2 instance in VPC B:&lt;br&gt;
&lt;code&gt;iperf3 -s&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.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%2F3uel7y3e1etlixsbtwk6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F3uel7y3e1etlixsbtwk6.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Task 2.2.3: Perform the following on the EC2 instance in VPC A
&lt;/h4&gt;

&lt;p&gt;124- Connect to &lt;strong&gt;EC2 VPC A - AZ1&lt;/strong&gt; using the session manager as we did before.&lt;br&gt;
125- Enter the following command to install iperf:&lt;br&gt;
&lt;code&gt;sudo yum install iperf3 -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;126- Enter the following command to set up a TCP transfer with 2 parallel streams for 30 seconds to the EC2 instance in VPC B. Make sure to replace &lt;/p&gt;

&lt;p&gt;&lt;br&gt;
 in the following command:&lt;br&gt;
&lt;code&gt;iperf3 -c &amp;lt;PRIVATE IP OF "EC2 VPC B- AZ1" INSTANCE 10.1.0.X&amp;gt; -P2 -t 30&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.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%2F4d5xru5iwsd0r8pxlv9h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F4d5xru5iwsd0r8pxlv9h.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;127- Shutdown the iperf3 server running on EC2 VPC B - AZ1 instance in VPC B by switching back to Session Manager and by pressing CTRL+C.&lt;/p&gt;

&lt;h3&gt;
  
  
  TASK 2.3: VIEW FLOW LOGS IN CLOUDWATCH
&lt;/h3&gt;

&lt;p&gt;VPC Flow logs can be sent to either an Amazon S3 bucket or CloudWatch. In this lab, you configured the flow logs from VPC A to be sent to CloudWatch. Navigate to CloudWatch to view the logs.&lt;br&gt;
Anatomy of a flow log:&lt;br&gt;
&lt;a href="https://media.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%2Fxo9j9faikk8ic3pwxvh7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fxo9j9faikk8ic3pwxvh7.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;128- Go to VPC service and select VPC A.&lt;br&gt;
&lt;a href="https://media.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%2Ffmqb6cqab91z66dx719v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ffmqb6cqab91z66dx719v.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;129- In the Details pane at the bottom of the page, choose the Flow logs tab.&lt;br&gt;
&lt;a href="https://media.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%2F7jjz3awvw7ldpva6npny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F7jjz3awvw7ldpva6npny.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;130- Under &lt;strong&gt;Destination name&lt;/strong&gt;, choose &lt;strong&gt;VPCFlowLog&lt;/strong&gt;  to navigate to CloudWatch.&lt;br&gt;
 When publishing to CloudWatch, flow log data is published to a log group, and each network interface has a unique log stream in the log group. Log streams contain flow log records. You can create multiple flow logs that publish data to the same log group.&lt;br&gt;
131- Select one of the network interface (ENI) log streams to see the flow records for that interface.&lt;br&gt;
 To find the appropriate log, use ENI from EC2 VPC A - AZ1 (on EC2 Instance - Networking Tab scroll to see Networking interfaces list).&lt;/p&gt;

&lt;h3&gt;
  
  
  TASK 2.4: QUERY FLOW LOG FOR INSIGHTS
&lt;/h3&gt;

&lt;p&gt;CloudWatch Logs Insights enables you to interactively search and analyze log data in CloudWatch Logs, including VPC flow logs. You can perform queries to help you more efficiently and effectively respond to operational issues.&lt;br&gt;
Run a query to show the top 10 talkers based on bytes transferred.&lt;/p&gt;

&lt;p&gt;132- Navigate to the browser tab with &lt;strong&gt;CloudWatch&lt;/strong&gt; service.&lt;br&gt;
133- On the left navigation pane, under  &lt;strong&gt;Logs&lt;/strong&gt;, choose &lt;strong&gt;Logs Insights&lt;/strong&gt;.&lt;br&gt;
134- From the drop-down list, select  VPCFlowLog.&lt;br&gt;
&lt;a href="https://media.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%2Frw8fqzy9qn75ab0hj6vh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Frw8fqzy9qn75ab0hj6vh.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
135- On the right navigation pane, choose  Queries.&lt;br&gt;
&lt;a href="https://media.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%2Ftid2p5u0pj6m2cq8anxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ftid2p5u0pj6m2cq8anxq.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;136- Under Sample queries, expand  VPC Flow Logs.&lt;br&gt;
137- From the list, choose  Top 10 byte transfers by source and destination IP addresses.&lt;br&gt;
&lt;a href="https://media.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%2Fjqwba134mterveo21res.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fjqwba134mterveo21res.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
138- Choose &lt;strong&gt;Apply&lt;/strong&gt;.&lt;br&gt;
139- Choose &lt;strong&gt;Run query&lt;/strong&gt;.&lt;br&gt;
Review the query results. Do you recognize the top two IP addresses?&lt;br&gt;
 Hint: Take a look at the Primary private IPv4 address and Description columns in the EC2 - Network Interfaces and see what they are for.&lt;/p&gt;

&lt;h3&gt;
  
  
  TASK 2.5: USING AMAZON CLOUDWATCH TO SET AN ALARM
&lt;/h3&gt;

&lt;p&gt;Amazon CloudWatch is a metrics repository. Amazon VPC publishes data points to Amazon CloudWatch for your transit gateways and transit gateway attachments. CloudWatch enables you to retrieve statistics about those data points as an ordered set of time series data, known as metrics. In this section, you will create a static route, set up an alarm on a threshold breach, and set up a dashboard to view a set of metrics on one page.&lt;/p&gt;

&lt;h4&gt;
  
  
  Task 2.5.1: Create a static route
&lt;/h4&gt;

&lt;p&gt;You can create a static route for a VPC, VPN, or transit gateway peering attachment, or you can create a blackhole route. The blackhole state indicates that the route’s target isn’t available. For more details on the static route and blackhole route, check Additional Resources.&lt;br&gt;
In this section, you will create a blackhole route in your transit gateway route table that drops traffic that matches the route. This task is necessary to view the CloudWatch Metrics in the later task.&lt;/p&gt;

&lt;p&gt;140- Go to VPC page.&lt;br&gt;
141- On the left navigation pane, under  Transit gateways, choose Transit gateway route tables.&lt;br&gt;
142- Select the route table you see with the route table ID starting with  tgw-rtb-xxxxxxxxxxxxxx.&lt;br&gt;
143- Choose the Routes tab in the lower half of the page.&lt;br&gt;
144- Choose &lt;strong&gt;Create static route&lt;/strong&gt;.&lt;br&gt;
145- Under Details, configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CIDR: Enter 10.3.0.0/16&lt;/li&gt;
&lt;li&gt;Type: Choose  Blackhole
&lt;img src="https://media.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%2Fdx88he4gvtgqxivcb73w.png" alt="Image description"&gt;
146- Choose &lt;strong&gt;Create static route&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Task 2.5.2: Create Alarm
&lt;/h3&gt;

&lt;p&gt;You can create a CloudWatch alarm that monitors CloudWatch metrics for a given AWS service. CloudWatch will automatically send you a notification when the metric reaches a threshold you specify.&lt;br&gt;
Create an alarm that monitors the number of packets dropped because they match a blackhole route of a Transit gateway. If the packets are dropped, an email notification is sent to the configured email address.&lt;/p&gt;

&lt;p&gt;147- Go to CloudWatch service.&lt;br&gt;
148- On the left navigation pane, under CloudWatch  Alarms, choose All alarms.&lt;br&gt;
149- Select &lt;strong&gt;Create alarm&lt;/strong&gt; .&lt;br&gt;
150- Choose &lt;strong&gt;Select metric&lt;/strong&gt; .&lt;br&gt;
151- On the &lt;strong&gt;Select metric&lt;/strong&gt; page, under the Metrics section, select the TransitGateway card.&lt;br&gt;
152- Select the &lt;em&gt;Per-TransitGateway Metrics&lt;/em&gt; card.&lt;br&gt;
153- Search for  &lt;em&gt;PacketDropCountBlackhole&lt;/em&gt; .&lt;br&gt;
154- Select tgw-xxxxxxxxxxxxxx Transit Gateway.&lt;br&gt;
&lt;a href="https://media.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%2Fwcg0gh45l9gjotoxrdi0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fwcg0gh45l9gjotoxrdi0.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
155- Choose &lt;strong&gt;Select metric&lt;/strong&gt; .&lt;br&gt;
156- On the Metric page, change the Statistic and Period parameters to the following:&lt;br&gt;
&lt;a href="https://media.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%2F9jkyf4678j95jn6tt6ro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F9jkyf4678j95jn6tt6ro.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fse5fpotaw1fpic5aksxe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fse5fpotaw1fpic5aksxe.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
157- On the Conditions section, configure the following:&lt;br&gt;
&lt;a href="https://media.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%2F52dv04ukak23nh4v80ld.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F52dv04ukak23nh4v80ld.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
158- Choose &lt;strong&gt;Next&lt;/strong&gt; .&lt;br&gt;
159- On the Notification page, configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alarm state trigger:  In alarm&lt;/li&gt;
&lt;li&gt;Send a notification to the following SNS topic:  Create new topic&lt;/li&gt;
&lt;li&gt;Create a new topic… :PacketDropCountBlackhole-Alarm&lt;/li&gt;
&lt;li&gt;Email endpoints that will receive the notification… Enter your email address where you want to receive the alarm notification.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fqylkx2565vm5xj7r3bvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fqylkx2565vm5xj7r3bvh.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
160- Choose &lt;em&gt;Create topic&lt;/em&gt;.&lt;br&gt;
161- Choose &lt;strong&gt;Next&lt;/strong&gt; .&lt;br&gt;
162- For the Alarm name, enter &lt;em&gt;PacketDropCountBlackhole-Alarm&lt;/em&gt;.&lt;br&gt;
163- Choose &lt;strong&gt;Next&lt;/strong&gt; .&lt;br&gt;
164- Review the settings on the next page and choose &lt;strong&gt;Create alarm&lt;/strong&gt;.&lt;br&gt;
The State of the alarm may show Insufficient data. This will happen until enough data points are received by the alarm.&lt;br&gt;
 Under Actions you may see Pending confirmation which means that you have not confirmed the subscription yet.&lt;br&gt;
 Amazon SNS will send a confirmation response to your email address. Be aware that this can take a few moments for it to be delivered.&lt;br&gt;
165- Go into your email, open the new email from AWS Notifications and choose the Confirm subscription link.&lt;br&gt;
&lt;a href="https://media.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%2Ful7mfm2dupx64rpwcqbu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ful7mfm2dupx64rpwcqbu.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
A new browser page opens indicating the subscription status has changed to Subscription Confirmed! This will be required to ensure you receive the notification.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 2.5.3: Trigger Alarm
&lt;/h3&gt;

&lt;p&gt;In this section, you will get the opportunity to trigger the alarm and test the notification that you configured.&lt;br&gt;
166- Go to the EC2 service page&lt;br&gt;
167- Using session manager to connect to &lt;em&gt;EC2 VPC A - AZ1&lt;/em&gt; instance. &lt;br&gt;
168- From the &lt;em&gt;EC2 VPC A - AZ1&lt;/em&gt; instance in VPC A try pinging any private IP address belonging to &lt;em&gt;10.3.0.0/16&lt;/em&gt; CIDR range for example &lt;em&gt;10.3.0.0&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fe8kdcqh7icay2otc410a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fe8kdcqh7icay2otc410a.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
If the number of packets dropped is greater or equal to 1 because they matched a blackhole route of a Transit gateway, then it will activate the CloudWatch Alarm you created.&lt;br&gt;
169- Go to &lt;strong&gt;CloudWatch&lt;/strong&gt; service page.&lt;br&gt;
170- On the left navigation pane, under CloudWatch  Alarms, choose All alarms.&lt;br&gt;
171- Confirm that the State of the PacketDropCountBlackhole-Alarm alarm is in alarm.&lt;br&gt;
&lt;a href="https://media.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%2F4md5dvrxlqbz9inw3ilp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F4md5dvrxlqbz9inw3ilp.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Please note that it may take a few minutes before you see the state change to In alarm.&lt;br&gt;
 The number of packets dropped crossed the set threshold. This will invoke the CloudWatch Alarm you created, which will send a message to the Amazon SNS topic. Amazon SNS will then send you an email message.&lt;br&gt;
172- Check your email to confirm that you received a notification with the subject ALARM: “PacketDropCountBlackhole-Alarm” alerting you that your Amazon CloudWatch Alarm has entered the ALARM state.&lt;br&gt;
&lt;a href="https://media.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%2Ftzibb8i1izpknwbooxpd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ftzibb8i1izpknwbooxpd.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Task 2.5.4: Create dashboard
&lt;/h3&gt;

&lt;p&gt;Amazon CloudWatch dashboards are customizable home pages in the CloudWatch console that you can use to monitor your resources in a single view, even those resources that are spread across different Regions. You can use CloudWatch dashboards to create customized views of the metrics and alarms for your AWS resources.&lt;br&gt;
In this section, you will create a CloudWatch Dashboard to view the &lt;strong&gt;PacketDropCountBlackhole&lt;/strong&gt; metric for the Transit Gateway.&lt;/p&gt;

&lt;p&gt;173- On the left navigation pane, choose Dashboards.&lt;br&gt;
174- Select &lt;strong&gt;Create dashboard&lt;/strong&gt; .&lt;br&gt;
&lt;a href="https://media.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%2F4rzwbvdbag3eac4tmcww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F4rzwbvdbag3eac4tmcww.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;175- Enter &lt;strong&gt;PacketDropCountBlackhole-Dashboard&lt;/strong&gt; for Dashboard name.&lt;br&gt;
176- Choose &lt;strong&gt;Create dashboard&lt;/strong&gt; .&lt;br&gt;
177- Select Number on the Add widget page, then choose &lt;strong&gt;Next&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.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%2Fhl5d0oac9ew294yxkdsf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fhl5d0oac9ew294yxkdsf.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
178- On the &lt;strong&gt;Add metric graph&lt;/strong&gt; page, under the &lt;strong&gt;Metrics&lt;/strong&gt; section, select the &lt;em&gt;TransitGateway&lt;/em&gt; card.&lt;br&gt;
179- Select the &lt;em&gt;Per-TransitGateway Metrics&lt;/em&gt; card.&lt;br&gt;
180- Search for  &lt;em&gt;PacketDropCountBlackhole&lt;/em&gt; .&lt;br&gt;
181- Select tgw-xxxxxxxxxxxxxx Transit Gateway.&lt;br&gt;
&lt;a href="https://media.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%2Fibuqwwwovoa5b5cm0evs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fibuqwwwovoa5b5cm0evs.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;181- Choose &lt;strong&gt;Graphed metrics (1)&lt;/strong&gt; tab.&lt;br&gt;
182- Change the Statistic and Period parameters:&lt;br&gt;
&lt;a href="https://media.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%2F631l9x77l694akhv32o6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F631l9x77l694akhv32o6.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.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%2F1byex8e1k54f9c98oyd5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F1byex8e1k54f9c98oyd5.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;183- Scroll to the top of the Add metric graph page. Near the top of the screen, by &lt;em&gt;Untitled graph&lt;/em&gt;, choose the Edit icon.&lt;br&gt;
184- Enter a name for the graph, such as PacketDropCountBlackhole-Graph.&lt;br&gt;
&lt;a href="https://media.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%2Fd0vojrpf1368qmb16s6z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fd0vojrpf1368qmb16s6z.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;185- Choose &lt;strong&gt;Apply&lt;/strong&gt; .&lt;br&gt;
186- Choose &lt;strong&gt;Create widget&lt;/strong&gt; at the bottom of the page.&lt;br&gt;
187- At the top of the dashboard, choose &lt;strong&gt;Save&lt;/strong&gt;.&lt;br&gt;
You can resize the widget by dragging the lower right corner of the graph. Change the data time span to 1h for better visualization. After making these modifications, always remember to choose &lt;strong&gt;Save&lt;/strong&gt; button to save your Dashboard changes.&lt;br&gt;
 &lt;strong&gt;&lt;em&gt;Task complete&lt;/em&gt;&lt;/strong&gt;: You have successfully generated traffic between instances, viewed the flow log in CloudWatch, and configured a CloudWatch Alarm, and a CloudWatch Dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 3: Security Controls
&lt;/h2&gt;

&lt;p&gt;Recall that at the end of Task 1, you had provisioned 3 AWS VPCs and EC2 instances in each VPC. The VPCs were interconnected using Transit Gateway. The environment is depicted as below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F57jgvgvzly8of40hps7j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F57jgvgvzly8of40hps7j.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will now be adding security to the environment you have built. You will use Network Access Lists (NACLs) and Security Groups, which are basic filtering mechanisms.&lt;/p&gt;

&lt;h3&gt;
  
  
  TASK 3.1: MODIFYING DEFAULT NETWORK ACLS TO BLOCK, ALLOW SUBNETS
&lt;/h3&gt;

&lt;p&gt;Network ACLs are stateless access controls you configure at a subnet level, to allow or block a CIDR block on a particular port or range of ports. Network ACL rules are numbered list and evaluated top down, with a DENY ALL at the end. If a rule is matched, subsequent rules are not evaluated.&lt;br&gt;
Both inbound and outbound traffic can be controlled with these rules. By default when you have created the above subnets, the default Network ACL attached to them will have an ALLOW ALL rule for both inbound and outbound traffic.&lt;br&gt;
In this task, you will modify Network ACL on &lt;strong&gt;VPC A - AZ1&lt;/strong&gt; to allow only VPC B’s CIDR; and test connectivity using ping to send ICMP traffic from VPC B to VPC A, and from VPC C to VPC A as well.&lt;br&gt;
 According to best practices, it is recommended to use a separate subnet for each transit gateway VPC attachment in case of using NACLs with Transit Gateways. We keep the inbound and outbound NACL that is associated with the transit gateway subnets open, and will apply NACLs with filters to your workload subnets.&lt;/p&gt;

&lt;h4&gt;
  
  
  Task 3.1.1: TGW Subnets &amp;amp; NACL configuration
&lt;/h4&gt;

&lt;p&gt;188- Go to the VPC service page.&lt;br&gt;
189- On the left navigation pane, under  Security, choose Network ACLs.&lt;br&gt;
190- At the upper-right corner of the Network ACLs page, choose Create network ACL.&lt;br&gt;
191- On the Create network ACL page, under Network ACL settings, configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name: nacl-tgw-vpca&lt;/li&gt;
&lt;li&gt;VPC: VPC A &lt;/li&gt;
&lt;li&gt;Tags: Accept proposed Tags
&lt;img src="https://media.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%2Fptqovjj7rgx6bx5uzi4g.png" alt="Image description"&gt;
192- Choose &lt;strong&gt;Create network ACL&lt;/strong&gt; .
193- Repeat these steps to create network ACLs:&lt;/li&gt;
&lt;li&gt;nacl-tgw-vpcb for VPC B.&lt;/li&gt;
&lt;li&gt;nacl-tgw-vpcc for VPC C.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;194- On the Network ACLs page, select &lt;strong&gt;nacl-tgw-vpca&lt;/strong&gt;.&lt;br&gt;
195- Choose the &lt;strong&gt;Subnet associations&lt;/strong&gt; tab.&lt;br&gt;
196- Choose &lt;strong&gt;Edit subnet associations&lt;/strong&gt; .&lt;br&gt;
197- From the Edit subnet associations page, select the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC A - AZ1 TGW&lt;/li&gt;
&lt;li&gt;VPC A - AZ2 TGW
198- Choose &lt;strong&gt;Save changes&lt;/strong&gt; .
199- Repeat these steps for VPC B and VPC C by choosing corresponding subnets with TGW in Subnet name.
&lt;img src="https://media.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%2Fiu8jksu8zok4hdf5sc26.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;200- On the Network ACLs page, select &lt;em&gt;nacl-tgw-vpca&lt;/em&gt;.&lt;br&gt;
201- On the &lt;em&gt;nacl-tgw-vpca&lt;/em&gt; Network ACLs page, at the bottom of the page, choose the Inbound rules tab.&lt;br&gt;
Notice there is only one inbound rule that denies all incoming traffic.&lt;br&gt;
&lt;a href="https://media.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%2F20hsb9ny5oah3tmzhd12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F20hsb9ny5oah3tmzhd12.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
202- At the right side of the &lt;strong&gt;Inbound rules&lt;/strong&gt; section, choose &lt;strong&gt;Edit inbound rules&lt;/strong&gt; .&lt;br&gt;
203- On the &lt;strong&gt;Edit inbound rules&lt;/strong&gt; page, choose &lt;strong&gt;Add new rule&lt;/strong&gt; and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rule number: 100&lt;/li&gt;
&lt;li&gt;Type: All traffic &lt;/li&gt;
&lt;li&gt;Source: 0.0.0.0/0&lt;/li&gt;
&lt;li&gt;Allow/Deny: Allow 
&lt;img src="https://media.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%2Fsfo017xkgfm2gqls6rza.png" alt="Image description"&gt;
204- Choose &lt;strong&gt;Save changes&lt;/strong&gt; .
205- On the &lt;strong&gt;nacl-tgw-vpca&lt;/strong&gt; Network ACLs page, at the bottom of the page, choose the &lt;strong&gt;Outbound rules&lt;/strong&gt; tab.
Notice there is only one outbound rule that denies all incoming traffic.
&lt;img src="https://media.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%2Frm94i3l9asjw0l5y3ett.png" alt="Image description"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;206- At the right side of the &lt;strong&gt;Outbound rules&lt;/strong&gt; section, choose &lt;strong&gt;Edit outbound rules&lt;/strong&gt; .&lt;br&gt;
207- On the Edit outbound rules page, choose Add new rule and configure the following:&lt;br&gt;
Rule number: 100&lt;br&gt;
Type: All traffic &lt;br&gt;
Destination: 0.0.0.0/0&lt;br&gt;
Allow/Deny: Allow &lt;br&gt;
&lt;a href="https://media.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%2Fck2pcayjdy5abyqwd7sm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fck2pcayjdy5abyqwd7sm.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;208- Choose &lt;strong&gt;Save changes&lt;/strong&gt; .&lt;br&gt;
209- Repeat the above steps to add the same Inbound and Outbound Rules in &lt;strong&gt;nacl-tgw-vpcb&lt;/strong&gt; and &lt;strong&gt;nacl-tgw-vpcc&lt;/strong&gt; Network ACLs.&lt;br&gt;
210- Now we’re ready to proceed to the next section and configure NACLs for EC2 instances to allow the ICMP traffic, TGW NACLs that allow everything will not introduce any blocking for us.&lt;/p&gt;

&lt;h4&gt;
  
  
  Task 3.1.2: NACL configuration for EC2 subnets in AZ1
&lt;/h4&gt;

&lt;p&gt;211- On the left navigation pane, under  Security, choose Network ACLs.&lt;br&gt;
212- In the Network ACLs page, in the Filter network ACLs search bar, search for  VPC A .&lt;br&gt;
&lt;a href="https://media.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%2Fkv13ughkw0m4txpjskny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fkv13ughkw0m4txpjskny.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
213- Select the ACL marked as the Default with a value of Yes.&lt;br&gt;
Check the default inbound rules in the Network ACL can be seen above. All traffic gets evaluated for Protocol, Port, and Source IP match. In this default Network ACL, all traffic is allowed into the VPC A-AZ1 Subnet by the first rule. The second rule which is a DENY ALL is not evaluated.&lt;br&gt;
We will now modify the first rule (100) to allow only ICMP traffic from VPC B’s CIDR.&lt;br&gt;
&lt;a href="https://media.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%2Fgp83jwajo2ougmz0xm6i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fgp83jwajo2ougmz0xm6i.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;214- On the Network ACLs page, at the bottom of the page, choose the &lt;strong&gt;Inbound rules&lt;/strong&gt; tab.&lt;br&gt;
215- At the right side of the Inbound rules section, choose &lt;strong&gt;Edit inbound rules&lt;/strong&gt;.&lt;br&gt;
216- On the Edit inbound rules page, modify rule number 100 and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type: All ICMP - IPv4 &lt;/li&gt;
&lt;li&gt;Source: 10.1.0.0/16&lt;/li&gt;
&lt;li&gt;Allow/Deny: Allow 
217- Choose &lt;strong&gt;Save changes&lt;/strong&gt; .
We have now completed modifying the Network ACL of VPC A - AZ1 Subnet to allow ONLY ICMP traffic from VPC B’s CIDR and all other traffic will be denied by the catch-all DENY rule. Let us now test this from VPC B - AZ1 Subnet for ALLOW, and VPC C - AZ1 Subnet for DENY.
Note that You have not modified outbound rules, and the default outbound rule allows ALL traffic to flow out of the subnet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TASK 3.2: TESTING CONNECTIVITY THROUGH NACLS FROM VPC B TO VPC A
&lt;/h3&gt;

&lt;p&gt;Here, you will login to EC2 VPC B - AZ1 using EC2 instance connect, and verify reachability to EC2 VPC A - AZ1 over ICMP (ping).&lt;br&gt;
218- Go to the EC2 service page.&lt;br&gt;
219- On the left navigation pane, choose Instances.&lt;br&gt;
220- Select the  &lt;strong&gt;EC2 VPC B - AZ1&lt;/strong&gt; instance.&lt;br&gt;
221- Choose &lt;strong&gt;Connect&lt;/strong&gt; from the navigation bar.&lt;br&gt;
222- With the Session Manager tab selected, choose &lt;strong&gt;Connect&lt;/strong&gt; .&lt;br&gt;
A terminal session should open in a new browser tab.&lt;br&gt;
223- From the EC2 VPC B - AZ1 instance in VPC B, try pinging the private IP addresses of the EC2 VPC A - AZ1 instance in VPC A.&lt;br&gt;
&lt;a href="https://media.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%2F1rvqp3a2jow8ayyhlvn8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F1rvqp3a2jow8ayyhlvn8.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
The ICMP traffic should flow through and show as being successfully returned. Enter ‘CTRL + C’ to stop the ping.&lt;br&gt;
You have now verified that the Network ACL on VPC A - AZ1 subnet is allowing ICMP traffic to flow in and out, from EC2 VPC B - AZ1.&lt;/p&gt;

&lt;h3&gt;
  
  
  TASK 3.3: TESTING CONNECTIVITY THROUGH NACLS FROM VPC C TO VPC A
&lt;/h3&gt;

&lt;p&gt;Similarly, connect to EC2 VPC C - AZ1 from EC2 console, and ping EC2 VPC A - AZ1 as you did from VPC B above.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fptlvkc7qpravug1msg9j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fptlvkc7qpravug1msg9j.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
The ping command will freeze without progress because the Network ACL in VPC A - AZ1 subnet is DENYING all traffic from VPC C. Enter ‘CTRL + C’ to stop the ping see review the results. They should indicate that no replies were received.&lt;br&gt;
 Task complete: You have successfully modified the default Network ACL in VPC A to allow ICMP traffic only from VPC B; the only other rule is a DENY ALL. You verified that ICMP traffic flows through from EC2 VPC B - AZ1 to EC2 VPC A - AZ1 and DID NOT flow through from EC2 VPC C - AZ1.&lt;/p&gt;

&lt;h3&gt;
  
  
  TASK 3.4: MODIFYING SECURITY GROUP TO ALLOW ONLY ICMP TRAFFIC FROM VPC C TO VPC A
&lt;/h3&gt;

&lt;p&gt;Security Groups are virtual, stateful firewalls attached to an instance or network interface. Both inbound and outbound rules can be defined to allow specific protocols, ports, and source/destination CIDR. A DENY is not possible with security groups.&lt;br&gt;
With Security Groups, all rules are evaluated before a network packet is allowed or blocked, unlike Network ACLs where the rules are evaluated in order of rule number and once a rule matches subsequent rules are not evaluated.&lt;br&gt;
In this section, you will modify the security group attached to EC2 VPC A - AZ1 to allow only ICMP traffic inbound from VPC C’s CIDR only. You will verify that EC2 VPC C - AZ1 can ping EC2 VPC A - AZ1, and EC2 VPC B - AZ1 is not able to ping EC2 VPC A - AZ1.&lt;br&gt;
 Prerequisite: Edit the Network ACL in VPC A - AZ1 subnet to revert the change to Rule 100, and set it to allow ALL TRAFFIC from all sources (0.0.0.0/0), because you want all traffic to flow past the Network ACL to the instance in VPC A to test the Security Group at the instance level.&lt;br&gt;
224- Navigate to the browser tab with VPC service.&lt;br&gt;
225- On the left navigation pane, under  Security, choose Network ACLs.&lt;br&gt;
226- On the Network ACLs page, in the Filter network ACLs search bar, search for  VPC A.&lt;br&gt;
227- On the Network ACLs page, at the bottom of the page, choose the &lt;strong&gt;Inbound rules&lt;/strong&gt; tab.&lt;br&gt;
228- At the right side of the &lt;strong&gt;Inbound rules&lt;/strong&gt; section, choose &lt;strong&gt;Edit inbound rules&lt;/strong&gt;.&lt;br&gt;
229- On the Edit inbound rules page, modify rule number 100 and configure the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type: All traffic &lt;/li&gt;
&lt;li&gt;Source: 0.0.0.0/0&lt;/li&gt;
&lt;li&gt;Allow/Deny: Allow &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;230- Choose &lt;strong&gt;Save changes&lt;/strong&gt; .&lt;br&gt;
231- Navigate to the browser tab with EC2 Instances.&lt;br&gt;
232- On the left navigation pane, choose Instances and select  EC2 VPC A - AZ1.&lt;br&gt;
233- Navigate to the Security tab below and choose the Security Group with ID starting with sg- (VPC A EC2 Security Group) in the lower pane to view and edit its rules.&lt;br&gt;
234- On the VPC A EC2 Security Group Security Group page, at the bottom of the page, choose the Inbound rules tab.&lt;br&gt;
235- At the right side of the &lt;strong&gt;Inbound rules&lt;/strong&gt; section, choose &lt;strong&gt;Edit inbound rules&lt;/strong&gt; .&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F6ugraczdkyf13kjltzfy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F6ugraczdkyf13kjltzfy.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;236- On the Edit inbound rules page, in the rule that is currently allowing All ICMP from 10.0.0.0/8 source, change it to allow only from VPC C’s CIDR:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type: All ICMP-IPv4 &lt;/li&gt;
&lt;li&gt;Source type: Custom &lt;/li&gt;
&lt;li&gt;Source: 10.2.0.0/16&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.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%2F9i6rc4slfghk1xsdpd2o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F9i6rc4slfghk1xsdpd2o.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;237- Choose &lt;strong&gt;Save rules&lt;/strong&gt; .&lt;/p&gt;

&lt;h2&gt;
  
  
  TASK 3.5: TESTING CONNECTIVITY FROM VPC B TO VPC A THROUGH SECURITY GROUPS
&lt;/h2&gt;

&lt;p&gt;Now you have modified the Security Group on EC2 VPC A - AZ1 to allow ICMP traffic (ping traffic) only from instances in VPC C. You will now verify that you are NOT able to ping this instance from EC2 VPC B - AZ1, and you are ABLE to ping from EC2 VPC C - AZ1.&lt;br&gt;
238- On the left navigation pane, choose Instances.&lt;br&gt;
239- Select the  EC2 VPC B - AZ1 instance.&lt;br&gt;
240- Choose Connect from the navigation bar.&lt;br&gt;
241- With the Session Manager tab selected, choose &lt;strong&gt;Connect&lt;/strong&gt;.&lt;br&gt;
 A terminal session should open in a new browser tab.&lt;br&gt;
242- From the EC2 VPC B - AZ1 ping to the private IP of the instance that is in VPC A.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F5r8lvcrcdt1ztir20ypn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F5r8lvcrcdt1ztir20ypn.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
It will not be able to reach out to the EC2 in VPC A.&lt;/p&gt;

&lt;h2&gt;
  
  
  TASK 3.6: TESTING CONNECTIVITY FROM VPC C TO VPC A THROUGH SECURITY GROUPS
&lt;/h2&gt;

&lt;p&gt;Similarly connect to EC2 VPC C - AZ1 and try to ping EC2 VPC A - AZ1.&lt;br&gt;
243- On the left navigation pane, choose Instances.&lt;br&gt;
244- Select the  EC2 VPC C - AZ1 instance.&lt;br&gt;
245- Choose Connect from the navigation bar.&lt;br&gt;
246- With the Session Manager tab selected, choose &lt;strong&gt;Connect&lt;/strong&gt;.&lt;br&gt;
A terminal session should open in a new browser tab.&lt;br&gt;
247- From the EC2 VPC C - AZ1 instance in VPC C, try pinging the private IP addresses of EC2 VPC A - AZ1 instance in VPC A.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fkxjgdjxd2oolo0a5wshv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fkxjgdjxd2oolo0a5wshv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ping will succeed and traffic will flow through. This is because the SG on EC2 VPC A - AZ1 is allowing ICMP traffic from VPC C’s CIDR range.&lt;br&gt;
 &lt;strong&gt;Task complete&lt;/strong&gt;: You have successfully modified the Security Group on EC2 VPC A - AZ1 to allow only ICMP traffic from VPC C. You tested and verified that you cannot ping this instance from VPC B, but You can ping it from VPC C confirming the behavior of the Security Group.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
 Congratulations! You now have successfully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Demonstrate intra versus inter-VPC routing.&lt;/li&gt;
&lt;li&gt;Select the appropriate connectivity options for an environment.&lt;/li&gt;
&lt;li&gt;Capture network traffic information (metadata) with VPC flow logs.&lt;/li&gt;
&lt;li&gt;Configure monitoring for networking statistics and metrics.&lt;/li&gt;
&lt;li&gt;Filter network traffic with Network Access Lists (NACLs), and Security Groups (SG).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;End lab&lt;/strong&gt;&lt;br&gt;
1- Delete the EC2s&lt;br&gt;
&lt;a href="https://media.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%2Fldu5b32gziskhrxy32qx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fldu5b32gziskhrxy32qx.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2- Go to the VPC service page to delete the TGW and VPCs&lt;/p&gt;

&lt;p&gt;3- Select &lt;strong&gt;Transit gateway attachments&lt;/strong&gt; under &lt;strong&gt;Transit gateways&lt;/strong&gt;&lt;br&gt;
4- You need to delete the attachments one by one&lt;br&gt;
&lt;a href="https://media.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%2Fr5cjwcw51kbch309q53v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fr5cjwcw51kbch309q53v.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fd5cuqs1cak7mea78gq4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fd5cuqs1cak7mea78gq4p.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
5- Select &lt;strong&gt;Transit gateways&lt;/strong&gt; under &lt;strong&gt;Transit gateways&lt;/strong&gt;.&lt;br&gt;
6- Select TGW and from Actions select &lt;strong&gt;Delete transit gateway&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.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%2Foremkemt8oo6o22dd8vu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Foremkemt8oo6o22dd8vu.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fu5hjkxy4f55iael9tgsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fu5hjkxy4f55iael9tgsv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7- Select &lt;strong&gt;Your VPCs&lt;/strong&gt; under &lt;strong&gt;Virtual private cloud&lt;/strong&gt;.&lt;br&gt;
6- Select &lt;strong&gt;VPC A&lt;/strong&gt;, then from Actions select delete VPC&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fxmk8barmobdq7joj7ttu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fxmk8barmobdq7joj7ttu.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
7- In &lt;strong&gt;Delete VPC&lt;/strong&gt; page, Enter &lt;em&gt;delete&lt;/em&gt; to confirm the delete then Select &lt;strong&gt;Delete&lt;/strong&gt;.&lt;br&gt;
8- Make the same with VPC B, and VPC C to delete them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Additional Resources&lt;/strong&gt;&lt;br&gt;
For more information about the topics covered in this lab, see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html" rel="noopener noreferrer"&gt;Amazon Virtual Private Cloud&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html" rel="noopener noreferrer"&gt;Amazon VPC Peering&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/vpc/latest/tgw/what-is-transit-gateway.html" rel="noopener noreferrer"&gt;AWS Transit Gateway&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/vpc/latest/tgw/how-transit-gateways-work.html#tgw-route-tables-overview" rel="noopener noreferrer"&gt;Route tables&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/tgw/tgw-route-tables.html#tgw-create-static-route" rel="noopener noreferrer"&gt;Create a static route&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html" rel="noopener noreferrer"&gt;VPC Flow Logs&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html" rel="noopener noreferrer"&gt;Amazon CloudWatch&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html" rel="noopener noreferrer"&gt;Amazon CloudWatch Metrics&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html" rel="noopener noreferrer"&gt;Amazon CloudWatch Alarms&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html" rel="noopener noreferrer"&gt;Amazon CloudWatch Dashboards&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html" rel="noopener noreferrer"&gt;AWS Network Access Control List&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html" rel="noopener noreferrer"&gt;Amazon Security Group&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>beginners</category>
      <category>networking</category>
    </item>
    <item>
      <title>AWS VPC From Zero to Hero Series: 1- Introduction to Amazon Virtual Private Cloud (VPC)</title>
      <dc:creator>Ahmed Shendy</dc:creator>
      <pubDate>Tue, 06 Feb 2024 08:09:49 +0000</pubDate>
      <link>https://dev.to/ahmedshendy/netcraft-the-aws-vpc-adventure-series-adventure-1-35kg</link>
      <guid>https://dev.to/ahmedshendy/netcraft-the-aws-vpc-adventure-series-adventure-1-35kg</guid>
      <description>&lt;p&gt;This is a series of hands-on labs that start from beginner level to advanced level to give you a real understanding of AWS VPC.&lt;/p&gt;

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

&lt;p&gt;In this adventure, you will use the Amazon VPC wizard to create a VPC, attach an Internet gateway, add a subnet, and then define routing for the VPC so traffic can flow between the subnet and the Internet gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topics covered
&lt;/h2&gt;

&lt;p&gt;Upon completion of this adventure, you will be able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an Amazon VPC Using the VPC Wizard&lt;/li&gt;
&lt;li&gt;Explore the basic components of a VPC including:
1- Public and private subnets
2- Route tables and routes
3- NAT gateways
4- Network ACLs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is Amazon Virtual Private Cloud (VPC)?
&lt;/h2&gt;

&lt;p&gt;Amazon Virtual Private Cloud (Amazon VPC) lets you provision a logically isolated section of the Amazon Web Services (AWS) cloud where you can launch AWS resources in a virtual network that you define. You have complete control over your virtual networking environment, including selection of your own IP address range, creation of subnets, and configuration of route tables and network gateways. You can use both IPv4 and IPv6 in your VPC for secure and easy access to resources and applications.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;An active AWS account.&lt;/li&gt;
&lt;li&gt;A user that has access to the AWS console with the needed permissions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ask 1: Create an Amazon VPC
&lt;/h2&gt;

&lt;p&gt;In this task you will create an Amazon VPC using the VPC wizard. The wizard automatically creates a VPC based upon parameters you specify. Using the VPC Wizard is much simpler than manually creating each component of the VPC.&lt;br&gt;
Here is an overview of the VPC you will create:&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%2Fq9snr0xknjw93ys061ye.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%2Fq9snr0xknjw93ys061ye.png" alt="Image description" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1- Open the AWS console, and select the region that you want to create the VPC in it.&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%2F785cnlh68y3e9srtvfej.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%2F785cnlh68y3e9srtvfej.png" alt="Image description" width="348" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2- At the top of the AWS Management Console, to the right of  Services menu, in the search bar, search for "VPC" and then choose VPC from the list&lt;br&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%2Fayjn5foyd6te887cfme7.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%2Fayjn5foyd6te887cfme7.png" alt="Image description" width="665" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3- Click &lt;strong&gt;VPC Dashboard&lt;/strong&gt; in the top-left corner.&lt;br&gt;
In every region, a default VPC with CIDR 172.31.0.0/16 has already been created for you. So, even if you haven’t created anything in your account yet, you will see some pre-existing VPC resources already there.&lt;br&gt;
4- Click &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%2Fkdws27388hz6duxg373f.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%2Fkdws27388hz6duxg373f.png" alt="Create VPC" width="119" height="31"&gt;&lt;/a&gt;&lt;br&gt;
5- On Create VPC page, under VPC settings section, choose VPC and more.&lt;br&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%2Fqka2tvv8yrdqb7dkmv0s.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%2Fqka2tvv8yrdqb7dkmv0s.png" alt="Image description" width="490" height="153"&gt;&lt;/a&gt;&lt;br&gt;
6- Configure the following fields:&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%2Fmo44ilb39c5vppaw4xtc.jpg" 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%2Fmo44ilb39c5vppaw4xtc.jpg" alt="Image description" width="800" height="1234"&gt;&lt;/a&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%2Fl6rsexo5xb2mdxmw6692.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%2Fl6rsexo5xb2mdxmw6692.png" alt="Image description" width="800" height="1262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7- Click&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%2Fqzbccssjcc7h7klswctq.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%2Fqzbccssjcc7h7klswctq.png" alt="Image description" width="107" height="28"&gt;&lt;/a&gt;&lt;br&gt;
Your VPC will now be created. A status window displays progress. When the VPC completes, a status window confirms that your VPC has been successfully created. This may take a few minutes to create.&lt;br&gt;
8- Click &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%2F9hlkjyt1vzcg1u2eaf9p.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%2F9hlkjyt1vzcg1u2eaf9p.png" alt="Image description" width="103" height="34"&gt;&lt;/a&gt;&lt;br&gt;
9- Copy the VPC IP value and keep it in your text editor.&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%2F7a0pk65wy597ti9fzmv9.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%2F7a0pk65wy597ti9fzmv9.png" alt="Image description" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 2: Explore your VPC
&lt;/h2&gt;

&lt;p&gt;In this task, you will explore the VPC components created by the VPC Wizard.&lt;br&gt;
10- Select Your VPCs from the left panel.&lt;br&gt;
11- In &lt;strong&gt;Filter by VPC&lt;/strong&gt; search about the created VPC.&lt;br&gt;
12- Locate Your VPCs’ Name column, your VPC is created with the name adventure_1-vpc.&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%2Fupqgbrltkbwbalnlnyfb.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%2Fupqgbrltkbwbalnlnyfb.png" alt="Image description" width="800" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;13- In the left navigation pane, choose Internet gateways.&lt;br&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%2Fdz7ax8bsbalwbyopca75.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%2Fdz7ax8bsbalwbyopca75.png" alt="Image description" width="800" height="144"&gt;&lt;/a&gt;&lt;br&gt;
The Internet gateway for your VPC will be displayed.&lt;br&gt;
An Internet gateway connects your VPC to the Internet. If the Internet gateway was not present, then the VPC would have no connectivity to the Internet.&lt;br&gt;
An Internet gateway is a horizontally scaled, redundant, and highly available VPC component. It therefore imposes no availability risks or bandwidth constraints on your network traffic.&lt;br&gt;
14- In the left navigation pane, choose Subnets.&lt;br&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%2Fz64ev5vq0na6r1r0m78h.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%2Fz64ev5vq0na6r1r0m78h.png" alt="Image description" width="800" height="130"&gt;&lt;/a&gt;&lt;br&gt;
A Subnet is a subset of a VPC. A subnet:&lt;br&gt;
    • Belongs to a specific VPC&lt;br&gt;
    • Exists in a single Availability Zone (while a VPC can span multiple Availability Zones)&lt;br&gt;
    • Has a range of IP addresses (known as a CIDR range, which stands for Classless Inter-Domain Routing)&lt;br&gt;
Two subnets will be displayed for your VPC: a Public subnet and a Private subnet.&lt;br&gt;
15- Select the &lt;strong&gt;Public subnet&lt;/strong&gt; which starts with &lt;strong&gt;adventure_1-subnet-public&lt;/strong&gt; in the &lt;strong&gt;Name&lt;/strong&gt; column.&lt;br&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%2Fkstcws4tylzl2d0hnysl.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%2Fkstcws4tylzl2d0hnysl.png" alt="Image description" width="800" height="312"&gt;&lt;/a&gt;&lt;br&gt;
Examine the information displayed in the lower window pane:&lt;br&gt;
    • Each subnet is assigned a unique &lt;strong&gt;Subnet ID&lt;/strong&gt;.&lt;br&gt;
    • The &lt;strong&gt;IPv4 CIDR&lt;/strong&gt; of &lt;em&gt;10.0.25.0/24&lt;/em&gt; means that the subnet contains the range of IP addresses from 10.0.25.0 to 10.0.25.255. (IPv6 is also supported, but is not part of this lab.)&lt;br&gt;
    • The subnet only has 250 &lt;strong&gt;Available IPs&lt;/strong&gt; out of 256 possible addresses. This is because there are several reserved addresses in each subnet and one IP address has been consumed by the NAT gateway.&lt;br&gt;
 Why is this subnet considered to be a Public subnet? The answer lies in the Subnet Routing.&lt;/p&gt;

&lt;p&gt;16- Choose the Route table tab.&lt;br&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%2Fkeekx8njknv9gho3dh0f.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%2Fkeekx8njknv9gho3dh0f.png" alt="Image description" width="755" height="269"&gt;&lt;/a&gt;&lt;br&gt;
Each subnet is associated with a Route table, which specifies the routes for outbound traffic leaving the subnet. Think of it like an address book that lists where to direct traffic based on its destination.&lt;br&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%2Fe6yhsrf2idxg0357r770.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%2Fe6yhsrf2idxg0357r770.png" alt="Image description" width="800" height="416"&gt;&lt;/a&gt;&lt;br&gt;
Two routes in the route table are associated with your public subnet:&lt;br&gt;
    • &lt;strong&gt;Route 10.0.0.0/16 | local&lt;/strong&gt; directs traffic destined for elsewhere in the VPC (which has a range of 10.0.0.0/16) locally within the VPC. This traffic never leaves the VPC.&lt;br&gt;
    • &lt;strong&gt;Route 0.0.0.0/0 | igw-&lt;/strong&gt; directs all traffic to the Internet gateway.&lt;br&gt;
Routing rules are evaluated from the most restrictive (with the bigger number after the slash) through to the least restrictive (which is 0.0.0.0/0 since it refers to the entire Internet). Thus, traffic is first sent within the VPC if it falls within the range of the VPC, otherwise, it is sent to the Internet. The rules can further be edited based on your particular network configuration.&lt;br&gt;
&lt;strong&gt;The fact that this subnet is associated with a Route Table that has a route to an Internet gateway makes it a Public Subnet&lt;/strong&gt;. That is, it is reachable from the Internet.&lt;/p&gt;

&lt;p&gt;17- Choose the Network ACL tab.&lt;br&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%2Fqnh8pv9nrngra360zrfp.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%2Fqnh8pv9nrngra360zrfp.png" alt="Image description" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A network access control list (ACL) is an optional layer of security for your VPC that acts as a firewall for controlling traffic in and out of subnets. Network ACLs are normally left with their default settings that allow all traffic in and out of subnets:&lt;br&gt;
    • &lt;strong&gt;Rule 100 Inbound&lt;/strong&gt; allows all inbound traffic into the Public Subnet.&lt;br&gt;
    • &lt;strong&gt;Rule 100 Outbound&lt;/strong&gt; allows all traffic out of the Public Subnet.&lt;br&gt;
    • The second line in each ruleset shows an asterisk (*) that acts as a catch-all rule in case traffic does not match any of the earlier rules.&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%2Fbu7sh0h4kl5qbuvgf032.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%2Fbu7sh0h4kl5qbuvgf032.png" alt="Image description" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;18- In the left navigation pane, choose Subnets.&lt;br&gt;
19- At the top of the window, select  Private subnet which starts with adventure_1-subnet-private in the Name column, and ensure that it is the only line selected.&lt;br&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%2F5z3uk5gy3d9jd3z9umii.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%2F5z3uk5gy3d9jd3z9umii.png" alt="Image description" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;20- Choose the &lt;strong&gt;Tags&lt;/strong&gt; tab.&lt;br&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%2Fcfh3wkeukz95lbkgkjgv.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%2Fcfh3wkeukz95lbkgkjgv.png" alt="Image description" width="800" height="179"&gt;&lt;/a&gt;&lt;br&gt;
The subnet has been tagged with the key of Name starting with the value of Lab-subnet-private. Tags help you to manage and identify your AWS resources.&lt;/p&gt;

&lt;p&gt;21- Choose the &lt;strong&gt;Route table&lt;/strong&gt; tab.&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%2Fm8cp92xmbd5hu5h3v12t.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%2Fm8cp92xmbd5hu5h3v12t.png" alt="Image description" width="800" height="226"&gt;&lt;/a&gt;&lt;br&gt;
The Route Table for the Private subnet has the configuration:&lt;br&gt;
    • &lt;strong&gt;Route 10.0.0.0/16 | local&lt;/strong&gt; is the same as the Public subnet.&lt;br&gt;
    • &lt;strong&gt;Route 0.0.0.0 | nat-&lt;/strong&gt; directs traffic to the NAT gateway.&lt;br&gt;
This subnet does not have a route to the Internet gateway. Therefore, it is a &lt;strong&gt;Private Subnet&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%2Fo978074egblps7zsicd2.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%2Fo978074egblps7zsicd2.png" alt="Image description" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;22- In the left navigation pane, choose &lt;strong&gt;NAT gateways&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%2Fyf46pw4p1j61hnrjn4je.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%2Fyf46pw4p1j61hnrjn4je.png" alt="Image description" width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Network Address Translation (NAT) gateway allows resources in a private subnet to connect to the Internet and other resources outside the VPC. This is an outbound-only connection, which means that the connection must be initiated from within the private subnet. Resources on the Internet cannot initiate an inbound connection. Therefore, it is a means of keeping resources private and improving security for VPC resources.&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%2Fggueai8u0bzr1kuxfpik.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%2Fggueai8u0bzr1kuxfpik.png" alt="Image description" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;23- In the left navigation pane, choose &lt;strong&gt;Security groups&lt;/strong&gt;, and select the security group that matches with your VPC ID.&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%2F0r6yq3m2deeecozot1fr.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%2F0r6yq3m2deeecozot1fr.png" alt="Image description" width="800" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;24- Choose the &lt;strong&gt;Inbound rules&lt;/strong&gt; tab.&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%2Fzj5yk4x99ctvqdfq1oc5.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%2Fzj5yk4x99ctvqdfq1oc5.png" alt="Image description" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Security groups act as virtual firewall for your instances to control inbound and outbound traffic. When you launch an Amazon EC2 instance into a VPC, you can assign up to five security groups to the instance. Security groups act at the instance level and not the subnet level. Your VPC automatically comes with a default security group. If you do not specify a different security group when you launch an Amazon EC2 instance, it will use the default security group.&lt;br&gt;
The default security group permits ALL traffic to access associated resources, but only if the Source is the default security group. This self-reference might appear strange, but this configuration simply means that any EC2 instance associated with the default security group can communicate with any other EC2 instance that is associated with the default security group. All other traffic is denied. This is a very safe default setting because it limits any access from other resources.&lt;br&gt;
When adding resources to the VPC, you can create additional security groups to permit desired access to resources such as web servers, application servers, and database servers.&lt;br&gt;
 Launching Amazon EC2 instances in this lab is out of the scope of the lab. Please do not attempt to launch an Amazon EC2 instance. This lab will not allow you to launch EC2 instances.&lt;/p&gt;

&lt;h2&gt;
  
  
  Delete the created resources
&lt;/h2&gt;

&lt;p&gt;Now let's end the first adventure by deleting the created resources.&lt;/p&gt;

&lt;p&gt;25- Select &lt;strong&gt;Nat gateways&lt;/strong&gt; from left navigation pane.&lt;br&gt;
26- From the NAT gateways list, select the one that matches your VPC ID, then from &lt;strong&gt;Actions&lt;/strong&gt; click on Delete NAT gateway.&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%2Fdxt5tmkgk0vqkm5relh5.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%2Fdxt5tmkgk0vqkm5relh5.png" alt="Image description" width="800" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;27- In the &lt;strong&gt;Delete Nat gateway&lt;/strong&gt; window, write &lt;em&gt;delete&lt;/em&gt; in the textbox, then click &lt;strong&gt;Delete&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%2Fb7yhnw6da1uwanvwov78.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%2Fb7yhnw6da1uwanvwov78.png" alt="Image description" width="655" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;28- Wait until the state of the NAT gateway became &lt;strong&gt;Deleted&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%2F20e9p1sa6xz4wsl8my12.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%2F20e9p1sa6xz4wsl8my12.png" alt="Image description" width="800" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;29- Select &lt;strong&gt;Your VPCs&lt;/strong&gt; from left navigation pane.&lt;br&gt;
30- From the VPCs list, select your VPC, then from &lt;strong&gt;Actions&lt;/strong&gt; click on &lt;strong&gt;Delete VPC&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%2Fhrrn3miq8oahyzd0r1mh.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%2Fhrrn3miq8oahyzd0r1mh.png" alt="Image description" width="800" height="185"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;31- In the &lt;strong&gt;Delete VPC&lt;/strong&gt; window, write &lt;em&gt;delete&lt;/em&gt; in the textbox, then click &lt;strong&gt;Delete&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>vpc</category>
      <category>networking</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to choose the right EC2 for your AWS workloads</title>
      <dc:creator>Ahmed Shendy</dc:creator>
      <pubDate>Mon, 24 Oct 2022 01:09:48 +0000</pubDate>
      <link>https://dev.to/ahmedshendy/how-to-choose-the-right-ec2-for-your-aws-workloads-48in</link>
      <guid>https://dev.to/ahmedshendy/how-to-choose-the-right-ec2-for-your-aws-workloads-48in</guid>
      <description>&lt;p&gt;Before we start choosing the right EC2, there are currently more than 550 instance types, so we will look at the current available instance types.&lt;/p&gt;

&lt;h3&gt;
  
  
  Instance naming
&lt;/h3&gt;

&lt;p&gt;The name of the EC2 is separated into two main parts by a dot, as shown in the below image; the second part is the size, the first part is the family, and which consists of letters and a digit; before this digit, there are one or more than one letters and this part is defining the category, the digit is for the generation, then after the digit, there are one or more letters each one defines a specific capability.&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%2Ftqvq9wn98lrjcunu8vhp.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%2Ftqvq9wn98lrjcunu8vhp.png" alt=" " width="503" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The available capabilities are :&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%2F9kb6t2l67g278dm8xmm8.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%2F9kb6t2l67g278dm8xmm8.png" alt=" " width="800" height="303"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fq12fwgz9rpj6voxjsq.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%2F0fq12fwgz9rpj6voxjsq.png" alt=" " width="557" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The bellow table shows the instance types for the current generations&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%2Fr54y1izt43lt8bihbx9m.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%2Fr54y1izt43lt8bihbx9m.png" alt=" " width="800" height="474"&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%2F79twlmxsfmjv3jl7ikod.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%2F79twlmxsfmjv3jl7ikod.png" alt=" " width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Instance type selection
&lt;/h3&gt;

&lt;p&gt;Now let's try to select the right instance, there are 2 rules that you can start with them.&lt;/p&gt;

&lt;p&gt;1- Select the latest generation, usually latest generation is better in performance and cheaper.&lt;/p&gt;

&lt;p&gt;2- If you don't have a specific requirement, start with T families.&lt;/p&gt;

&lt;p&gt;What attributes do you need?&lt;br&gt;
try to get answer to these questions:&lt;/p&gt;

&lt;p&gt;Do you need a specific processor type?&lt;br&gt;
Can you take advantage of burstable performance?&lt;br&gt;
Can you take advantage of ARM processors?&lt;br&gt;
How much total memory do you need (min/max)?&lt;br&gt;
What is your required vCPU:memory ratio?&lt;br&gt;
What are your network performance requirements?&lt;br&gt;
Do you need accelerated computing options? GPU? FPGA?&lt;/p&gt;

&lt;p&gt;After getting answers for the above questions, then you can find you candidate instance from the above table.&lt;/p&gt;

&lt;h3&gt;
  
  
  EC2 Instance Discovery
&lt;/h3&gt;

&lt;p&gt;AWS provides an easy way to discover, locate, and compare EC2 instances.&lt;/p&gt;

&lt;p&gt;Go to the console then EC2 &amp;gt; Instances Types &amp;gt; Instance Types&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%2F90qqoffaaqcpuzsmqrzd.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%2F90qqoffaaqcpuzsmqrzd.png" alt=" " width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
      <category>architecture</category>
    </item>
    <item>
      <title>How to choose the right load balancer for your AWS workloads</title>
      <dc:creator>Ahmed Shendy</dc:creator>
      <pubDate>Tue, 04 Oct 2022 15:35:04 +0000</pubDate>
      <link>https://dev.to/ahmedshendy/how-to-choose-the-right-load-balancer-for-your-aws-workloads-1m2l</link>
      <guid>https://dev.to/ahmedshendy/how-to-choose-the-right-load-balancer-for-your-aws-workloads-1m2l</guid>
      <description>&lt;p&gt;Before talking about how to choose the right load balancer, let's take a look about what are the available load balancers in AWS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Feeiwoopivdhkm6mx763g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Feeiwoopivdhkm6mx763g.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  When do we need to use the Application LB?
&lt;/h3&gt;

&lt;p&gt;When we have one of the below targets combined with one or more from the below requirements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fv7xzchhstskcs6vylgw4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fv7xzchhstskcs6vylgw4.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  When do we need to use the Network LB?
&lt;/h3&gt;

&lt;p&gt;When we have one of the below targets combined with one or more from the below requirements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Flswxa9qymlqqusuifsnd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Flswxa9qymlqqusuifsnd.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  When do we need to use the Gateway LB?
&lt;/h3&gt;

&lt;p&gt;When we have one of the below targets combined with one or more from the below requirements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fyx62dye9phmf95zeqfmm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fyx62dye9phmf95zeqfmm.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  When do we need to use the AWS Global Accelerator?
&lt;/h3&gt;

&lt;p&gt;When we have one of the below targets combined with one or more from the below requirements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F3pataxrxilkfsg211eg8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F3pataxrxilkfsg211eg8.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get more details on how to select the LB got to this session &lt;a href="https://www.youtube.com/watch?v=p0YZBF03r5A" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=p0YZBF03r5A&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>architecture</category>
      <category>network</category>
      <category>devops</category>
    </item>
    <item>
      <title>Introducing OpenShift Container
Platform 4</title>
      <dc:creator>Ahmed Shendy</dc:creator>
      <pubDate>Mon, 15 Nov 2021 18:55:29 +0000</pubDate>
      <link>https://dev.to/ahmedshendy/introducing-openshift-containerplatform-4-16mc</link>
      <guid>https://dev.to/ahmedshendy/introducing-openshift-containerplatform-4-16mc</guid>
      <description>&lt;h2&gt;
  
  
  OpenShift Container Platform 4 Architecture
&lt;/h2&gt;

&lt;p&gt;Red Hat OpenShift Container Platform 4 (RHOCP 4) is a set of modular components and services built on top of Red Hat CoreOS and Kubernetes.&lt;br&gt;
One of the main advantages of using OpenShift is that it uses several nodes to ensure the resiliency and scalability of its managed applications. OpenShift forms a cluster of node servers that run containers and are centrally managed by a set of master servers.&lt;/p&gt;

&lt;p&gt;The following diagram illustrates the high-level logical overview of the OpenShift Container Platform 4 architecture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6YXZWOau--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nzn5di2bfoe6px2pi103.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6YXZWOau--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nzn5di2bfoe6px2pi103.png" alt="OCP 4 Architecture" width="880" height="692"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following diagram illustrates the OpenShift Container Platform stack.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cWkTcHR8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uav645q1roc4wplf8qkk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cWkTcHR8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uav645q1roc4wplf8qkk.png" alt="OCP Stack" width="880" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From bottom to top, and from left to right, this shows the basic container infrastructure, integrated and enhanced by Red Hat:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Red Hat CoreOS&lt;/strong&gt; is the base OS on top which OpenShift runs. Red Hat CoreOS is a Linux distribution focused on providing an immutable operating system for container execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CRI-O&lt;/strong&gt; is an implementation of the Kubernetes Container Runtime Interface (CRI) to enable using Open Container Initiative (OCI) compatible runtimes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kubernetes&lt;/strong&gt; manages a cluster of hosts, physical or virtual, running containers. It uses resources that describe multicontainer applications composed of multiple resources, and how they interconnect&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;etcd&lt;/strong&gt; is a distributed key-value store, used by Kubernetes to store configuration and state information about the containers and other resources inside the Kubernetes cluster&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Resource Definitions (CRDs)&lt;/strong&gt; are resource types stored in etcd and managed by Kubernetes. These resource types form the state and configuration of all resources managed by OpenShift. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Containerized services&lt;/strong&gt; fulfill many PaaS infrastructure functions, such as networking and authorization. RHOCP uses the basic container infrastructure from Kubernetes and the underlying container runtime for most internal functions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtimes and xPaaS&lt;/strong&gt; are base container images ready for use by developers, each preconfigured with a particular runtime language or database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DevOps Tools and User Experience&lt;/strong&gt;: RHOCP provides web UI and CLI management tools for managing user applications and RHOCP services.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following table lists some of the most commonly used terminology when you work with OpenShift.&lt;/p&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;Definition&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Node&lt;/td&gt;
&lt;td&gt;A server that hosts applications in an OpenShift cluster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Master Node&lt;/td&gt;
&lt;td&gt;A node server that manages the control plane in an OpenShift cluster. Master nodes provide basic cluster services such as APIs or controllers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worker Node&lt;/td&gt;
&lt;td&gt;Worker nodes execute workloads for the cluster. Application pods are scheduled onto worker nodes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resource&lt;/td&gt;
&lt;td&gt;Resources are any kind of component definition managed by OpenShift.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Controller&lt;/td&gt;
&lt;td&gt;A controller is an OpenShift component that watches resources and makes changes attempting to move the current state towards the desired state.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Label&lt;/td&gt;
&lt;td&gt;A key-value pair that can be assigned to any OpenShift resource.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Namespace or Project&lt;/td&gt;
&lt;td&gt;A scope for OpenShift resources and processes, so that resources with the same name can be used in different contexts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Console&lt;/td&gt;
&lt;td&gt;A web UI provided by OpenShift that allows developers and administrators to manage cluster resources.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  New Features in RHOCP 4
&lt;/h2&gt;

&lt;p&gt;RHOCP 4 includes new features, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CoreOS as the default operating system for all nodes, offering an immutable infrastructure optimized for containers&lt;/li&gt;
&lt;li&gt;A new cluster installer, which simplifies the process of installing and updating the masters and worker nodes in the cluster&lt;/li&gt;
&lt;li&gt;A self-managing platform, able to automatically apply cluster updates and recoveries without disruption.&lt;/li&gt;
&lt;li&gt;A redesigned web console based on the concept of "personas", targeting both platform administrators and developers&lt;/li&gt;
&lt;li&gt;An Operator SDK to build, test, and package Operators.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Describing OpenShift Resource Types
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pods (pod)&lt;/strong&gt; are the basic unit of work for OpenShift.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Services (svc)&lt;/strong&gt; Specific IP/port combinations that provides access to a pool of pods. By default, services connect clients to pods in a round-robin fashion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replication Controllers (rc)&lt;/strong&gt; OpenShift resources that define how pods are replicated (horizontally scaled) to different nodes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent Volumes (pv)&lt;/strong&gt; Storage areas to be used by pods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent Volume Claims (pvc)&lt;/strong&gt; Requests for storage by a pod. A pvc links a pv to a pod so its containers can make use of it, usually by mounting the storage into the container's file system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Config Maps (cm)&lt;/strong&gt; A set of keys and values that can be used by other resources. ConfigMaps and Secrets are usually used to centralize configuration values used by several resources. Secrets differ from ConfigMaps maps in that Secrets are used to store sensitive data (usually encrypted), and their access is restricted to fewer authorized users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment Configs (dc)&lt;/strong&gt; A set of containers included in a pod, and the deployment strategies to be used. A dc also provides a basic but extensible continuous delivery workflow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Configs (bc)&lt;/strong&gt; A process to be executed in the OpenShift project. The OpenShift Source-to-Image (S2I) feature uses BuildConfigs to build a container image from application source code stored in a Git repository. A bc works together with a dc to provide a basic but extensible continuous integration and continuous delivery workflows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routes&lt;/strong&gt; DNS host names recognized by the OpenShift router as an ingress point for various applications and microservices deployed on the cluster.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image Streams (is)&lt;/strong&gt; An image stream and its tags provide an abstraction for referencing container images from within OpenShift Container Platform. The image stream and its tags allow you to track what images are available and ensure that you are using the specific image you need even if the image in the repository changes. Image streams do not contain actual image data, but present a virtual view of related images, similar to an image repository.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>containers</category>
      <category>devops</category>
      <category>openshift</category>
    </item>
  </channel>
</rss>
