<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Aws on The Network Stack</title>
    <link>https://thenetworkstack.com/tags/aws/</link>
    <description>Recent content in Aws on The Network Stack</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 30 Nov 2018 16:28:22 +0000</lastBuildDate>
    <atom:link href="https://thenetworkstack.com/tags/aws/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>AWS Transit Gateway</title>
      <link>https://thenetworkstack.com/aws-transit-gateway/</link>
      <pubDate>Fri, 30 Nov 2018 16:28:22 +0000</pubDate>
      <guid>https://thenetworkstack.com/aws-transit-gateway/</guid>
      <description>&lt;p&gt;At re:Invent 2018, AWS announced the Transit Gateway, finally giving us a native solution to provide scalable transit connectivity. After attending sessions and deploying Transit Gateway, I wanted to dive into the solution and see what is possible.&lt;/p&gt;
&lt;h4 id=&#34;tech-specs&#34;&gt;&lt;strong&gt;Tech Specs&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;In case you haven&amp;rsquo;t read the &lt;a href=&#34;#preofficialdocs&#34;&gt;official docs&lt;/a&gt;, the AWS Transit Gateway is a regional layer3 router connecting VPC, VPN, Direct Connect (soon) across multiple accounts, with support for multiple route tables (VRFs). The Transit Gateway (TGW) has &lt;em&gt;much&lt;/em&gt; higher scalability limits than VPC peering.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>At re:Invent 2018, AWS announced the Transit Gateway, finally giving us a native solution to provide scalable transit connectivity. After attending sessions and deploying Transit Gateway, I wanted to dive into the solution and see what is possible.</p>
<h4 id="tech-specs"><strong>Tech Specs</strong></h4>
<p>In case you haven&rsquo;t read the <a href="#preofficialdocs">official docs</a>, the AWS Transit Gateway is a regional layer3 router connecting VPC, VPN, Direct Connect (soon) across multiple accounts, with support for multiple route tables (VRFs). The Transit Gateway (TGW) has <em>much</em> higher scalability limits than VPC peering.</p>
<p><img alt="tgw-limits" loading="lazy" src="/images/2018/11/tgw-limits.png"></p>
<p><em>How did Amazon put a big router in the cloud?</em><br>
The Transit Gateway is part of the AWS Hyperplane architecture, an internal AWS service that provides terabits of capacity. This is tested and proven tech, already powering NLB, NAT Gateway, and EFS:</p>
<p><img alt="tgw-hyperplane" loading="lazy" src="/images/2018/11/tgw-hyperplane.jpg"></p>
<h4 id="configuration"><strong>Configuration</strong></h4>
<p>To setup a TGW, log into your AWS account, and go to VPC. When you click &ldquo;Create Transit Gateway&rdquo;, you&rsquo;ll be greeted with this screen:</p>
<p><img alt="tgw-create" loading="lazy" src="/images/2018/11/tgw-create.png"></p>
<p>There are a couple options that weren&rsquo;t immediately clear to me, so lets go through them all:</p>
<ul>
<li><strong>Name tag:</strong> Up to you, I use $accountName-$region-tgw</li>
<li><strong>Description:</strong> ^</li>
<li><strong>Amazon side ASN:</strong> Depends on your routing policy, I use a unique private ASN per TGW for routing policy flexibility</li>
<li><strong>DNS support:</strong> Allows private DNS resolution across VPCs, I would keep this checked</li>
<li><strong>VPN ECMP support:</strong> A single VPN connection is limited to 1.25Gbps, so enable ECMP and use multiple VPN connections to aggregate VPN throughput. AWS has tested up to 50Gbps successfully with ECMP, but theoretically there is &ldquo;no limit&rdquo;.</li>
<li><strong>Default route table association:</strong> Automatically associate attachments with the default route table. For example, when you attach a VPC to the TGW, use the default route table. This depends on how you use route tables, but I would keep this checked.</li>
<li><strong>Default route table propagation:</strong> Automatically propogate routes from attachments into the default route table. This will allow anything connected to the default route table to route to each other (assuming the VPC route table is also configured). Depending on how you use the TGW, you may not want this. If you do not want spoke-to-spoke connectivity, do not check this.</li>
<li><strong>Auto accept shared attachments:</strong> Automatically accept cross-account attachments to your VPC. I would leave this unchecked.</li>
</ul>
<p><em>CAUTION</em>: You <strong>cannot</strong> change the above values later. You would need to create a new TGW.</p>
<p>Once your TGW is created, you need to &ldquo;attach&rdquo; it to a VPC or VPN connection. For VPN, this should look familiar, as you use BGP or static routing to connect to a customer gateway. For VPC, things start to deviate from previous transit solutions. First, you must select VPC subnets in every AZ that you plan to use. This provisions an ENI in those subnets that the TGW then uses to route traffic to that AZ. <em>You can only select one subnet per AZ.</em> <strong>This does not affect routing to other subnets in the AZ</strong>, its just what the TGW uses to route to that AZ. Then, you manually add routes in the route table that point to the TGW target. The VPC route table limits have not changed (50 route default, 100 route max), so it is best practice to use a summary route to the TGW. I would just route the RFC1918 address ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to the TGW, and then any VPC peering you may do will still work with a more specific route.</p>
<p>Once the TGW is attached to your VPCs, you then need to associate the attachment with a route table, and propopage routes into the route table. If you left all the default options when creating the TGW, both of these actions are done automatically. This provides <em>flat</em>, any-to-any VPC routing out of the box.</p>
<p><img alt="tgw-any" loading="lazy" src="/images/2018/11/tgw-any.jpg"></p>
<p>If you are looking for <em>isolated</em> hub-and-spoke routing (prevent spokes from talking), then we need to change our config:</p>
<ol>
<li>Create a new TGW route table (VRF) for your hub location, which could be another VPC or VPN</li>
<li>Associate the hub attachment with the TGW hub route table</li>
<li>Propagate the spoke routes into the TGW hub route table</li>
<li>Propagate the hub routes into the TGW default route table, used by the spokes</li>
<li>If the default route table has all the spoke routes present, delete those. You can always add routes back if needed. This prevents the spokes from routing to each other, while still allowing access to the hub.</li>
</ol>
<p><img alt="tgw-isolated" loading="lazy" src="/images/2018/11/tgw-isolated.jpg"></p>
<p>Finally, since TGW is a regional service, how do you connect multiple regions? Right now, this would be done with a transit VPC, or an on-premise router. But if you can wait until early 2019, AWS should have a native solution!</p>
<p><img alt="tgw-multiregion" loading="lazy" src="/images/2018/11/tgw-multiregion.jpg"></p>
<p>To summarize, the two architectures discussed here were:</p>
<ol>
<li><strong>Flat, any-to-any connectivity.</strong> Achieved with the default TGW configuration. All associations and propagations go into the default route table.</li>
<li><strong>Isolated, hub-and-spoke connectivity.</strong> Requires another route table for the hub, and changing route propagation so the spokes only see the hubs route. The hub route table should have propagated routes from all the spokes.</li>
</ol>
<p>AWS Transit Gateway is a great addition to the AWS networking stack, and really provides a extremely scalable, secure solution for routing in the cloud.</p>
<hr>
<h4 id="official-docs"><strong>Official Docs</strong></h4>
<p><a href="https://aws.amazon.com/about-aws/whats-new/2018/11/introducing-aws-transit-gateway/">Introducing AWS Transit Gateway</a><br>
<a href="https://aws.amazon.com/transit-gateway/">AWS Transit Gateway Solution</a><br>
<a href="https://docs.aws.amazon.com/vpc/latest/tgw/what-is-transit-gateway.html">AWS Transit Gateway Docs</a></p>
<h4 id="update-aws-has-posted-all-the-slides-from-the-net402-session"><strong>Update:</strong> AWS has posted all the slides from the NET402 session</h4>
<iframe allowfullscreen="" frameborder="0" height="485" marginheight="0" marginwidth="0" scrolling="no" src="https://www.slideshare.net/slideshow/embed_code/key/zDwhn3Fj4nxlcd" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" width="595"> </iframe>
<p><strong><a href="//www.slideshare.net/AmazonWebServices/new-launch-aws-transit-gateway-and-transit-vpcs-reference-architectures-for-many-vpcs-net402-aws-reinvent-2018">[NEW LAUNCH!] AWS Transit Gateway and Transit VPCs - Reference Architectures for Many VPCs (NET402) - AWS re:Invent 2018</a></strong></p>
]]></content:encoded>
    </item>
    <item>
      <title>AWS Certified Advanced Networking in 20 Days</title>
      <link>https://thenetworkstack.com/aws-certified-advanced-networking-in-20-days/</link>
      <pubDate>Mon, 12 Nov 2018 15:06:52 +0000</pubDate>
      <guid>https://thenetworkstack.com/aws-certified-advanced-networking-in-20-days/</guid>
      <description>&lt;p&gt;Can the AWS Certified Advanced Networking Specialty exam be legitemately passed with only a few weeks of studying? &lt;strong&gt;Yes.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Is there a secret shortcut? &lt;strong&gt;No.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Although there is no shortcut, I will discuss my &lt;strong&gt;previous experience&lt;/strong&gt;, &lt;strong&gt;study materials&lt;/strong&gt;, and &lt;strong&gt;general impressions&lt;/strong&gt; of the exam. If you have already been working with AWS networking, and wondering what it takes to be certified, this post should give you a pretty good idea. Regarding my timeline, I passed the AWS Certified Solutions Architect Associate exam on 10/18/18, and then passed the AWS Certified Advanced Networking Specialty exam twenty days later on 11/7/18.&lt;br&gt;
\&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Can the AWS Certified Advanced Networking Specialty exam be legitemately passed with only a few weeks of studying? <strong>Yes.</strong></p>
<p>Is there a secret shortcut? <strong>No.</strong></p>
<p>Although there is no shortcut, I will discuss my <strong>previous experience</strong>, <strong>study materials</strong>, and <strong>general impressions</strong> of the exam. If you have already been working with AWS networking, and wondering what it takes to be certified, this post should give you a pretty good idea. Regarding my timeline, I passed the AWS Certified Solutions Architect Associate exam on 10/18/18, and then passed the AWS Certified Advanced Networking Specialty exam twenty days later on 11/7/18.<br>
\</p>
<h4 id="1-previous-experience"><strong>1. Previous Experience</strong></h4>
<p>First, I&rsquo;ve worked in &ldquo;traditional&rdquo; networking before starting my AWS experience, and have passed the Cisco CCNP and CCDP exams. This is a huge advantage if you are looking to take the AWS Certified Advanced Network Specialty exam (ANS), since the <a href="https://d1.awsstatic.com/training-and-certification/eligibilityupdates/AWS%20Certified%20Advanced%20Networking%20-%20Speciality_Exam_Guide_v1.2_FINAL.pdf">exam guide</a> recommends the following &ldquo;General IT Knowledge&rdquo;:</p>
<ul>
<li>Advanced networking architectures and interconnectivity options (e.g., IP VPN, MPLS/VPLS)</li>
<li>Networking technologies within the OSI model, and how they affect implementation decisions</li>
<li>Development of automation scripts and tools</li>
<li>Routing architectures (including static and dynamic)</li>
<li>Multi-region solutions for a global enterprise</li>
<li>Highly available connectivity solutions (e.g., DX, VPN)</li>
<li>CIDR and sub-netting (IPv4 and IPv6)</li>
<li>IPv6 transition challenges</li>
<li>Generic solutions for network security features, including WAF, IDS, IPS, DDoS protection, and Economic Denial of Service/Sustainability (EDoS).</li>
</ul>
<p>90% of those topics are covered by the CCNP, and if you have worked in an enterprise environment, you have probably seen or used similar network security features listed on the last line.</p>
<p>Second, I have been working with AWS networking for about 4 years. This started out small, troubleshooting a security group, or creating a vpc, and growing to designing multi-account, multi-region network services and connectivity. This was supplemented by the knowledge I recently gained studying for and taking the AWS SAA exam. Even though an associate exam is no longer required to take a specialty exam, I would highly recommend it, so you can learn the AWS way of doing things &ldquo;right&rdquo;.<br>
\</p>
<h4 id="2-study-materials"><strong>2. Study Materials</strong></h4>
<p>Even with the experience described above, I did not immediately go and take the exam. For me, passing the exam isn&rsquo;t just filling in the correct answer, its learning the AWS approach to solving problems, and all the available solutions. I used two main resources to study for the exam:</p>
<ul>
<li>Linux Academy <a href="https://linuxacademy.com/amazon-web-services/training/course/name/aws-certified-networking-specialty">Online Course</a></li>
<li>The AWS Certified Advanced Networking <a href="https://www.amazon.com/Certified-Advanced-Networking-Official-Study/dp/1119439833/">Official Study Guide</a></li>
</ul>
<p>After using Linux Academy for the SAA exam, I was excited to try their ANS cource. Unfortunately I wasn&rsquo;t as impressed, maybe because I was already familiar with the material, but there also weren&rsquo;t as many labs, and the quizes towards the end felt lazy with only a couple questions each. Overall, I did find the material useful and mostly listened to the instructor at 1.25x or 1.5x speed while taking notes on important points. I still recommend Linux Academy as a general training resource, since I&rsquo;m a fan of their on-demand labs and wide range of content.</p>
<p>If you are looking to get the most bang for your buck, I would definitely purchase the official study guide. The guide is written by seven AWS Solutions Architects, and I found the content very thorough. At the end of every chapter are resources to review, exam essentials, exercises and review questions. The book also includes online practice exams and flashcards. I recommend taking the practice exams over and over again until you genuinely understand each question and the correct answer.</p>
<p>Last, AWS provides whitepapers and various documentation that can also be used as study material. Near the end of my studying I also found more content on <a href="https://aws.amazon.com/answers/networking/">AWS Answers</a>. For example, these articles on network connectivity:</p>
<ul>
<li><a href="https://aws.amazon.com/answers/networking/aws-multiple-data-center-ha-network-connectivity/">Multiple Data Center HA Network Connectivity</a></li>
<li><a href="https://aws.amazon.com/answers/networking/aws-single-data-center-ha-network-connectivity/">Single Data Center HA Network Connectivity</a><br>
\</li>
</ul>
<h4 id="3-general-impressions"><strong>3. General Impressions</strong></h4>
<p>I thought this was a difficult test. It isn&rsquo;t enough to know one solution to a given scenario. AWS expects you to know every solution to a scenario, the benefits and limits of each solution, and be able determine the best solution <em>for the scenario</em>. <strong>You need to deep dive into each subject</strong>. There were still times that I didn&rsquo;t 100% know the answer that AWS was looking for, and I had to make an educated guess. I think &ldquo;Domain 5.0: Design and implement for security and compliance&rdquo; from the <a href="https://d1.awsstatic.com/training-and-certification/eligibilityupdates/AWS%20Certified%20Advanced%20Networking%20-%20Speciality_Exam_Guide_v1.2_FINAL.pdf">exam guide</a> was my biggest challenge. Unfortunately I can&rsquo;t go into more detail, as I don&rsquo;t want to risk violating the <a href="https://aws.amazon.com/certification/certification-agreement/">exam agreement</a>. I am proud to have passed the AWS ANS exam, and I think it is worth pursuing if you work with AWS networking frequently.</p>
<p>Hopefully this post was helpful, if you&rsquo;d like to discuss AWS networking, come find me at re:Invent 2018! I can be reached via <a href="https://twitter.com/DanielKuchenski">Twitter</a>.<br>
\</p>
<p><img alt="aws-ans-small" loading="lazy" src="/images/2018/11/aws-ans-small.png"></p>
<p>PS. I also discovered a couple other blog posts with some amazing study content after I had already passed the exam:</p>
<p><a href="https://blog.ashiny.cloud/2018/07/29/aws-certified-advanced-networking-specialty/">https://blog.ashiny.cloud/2018/07/29/aws-certified-advanced-networking-specialty/</a></p>
<p><a href="https://www.itdiversified.com/aws-certified-advanced-networking-prep-direct-connect/">https://www.itdiversified.com/aws-certified-advanced-networking-prep-direct-connect/</a><br>
<a href="https://www.itdiversified.com/aws-certified-advanced-networking-prep-vpc/">https://www.itdiversified.com/aws-certified-advanced-networking-prep-vpc/</a><br>
<a href="https://www.itdiversified.com/aws-certified-advanced-networking-prep-vpn/">https://www.itdiversified.com/aws-certified-advanced-networking-prep-vpn/</a><br>
<a href="https://www.itdiversified.com/aws-certified-advanced-networking-prep-route-53/">https://www.itdiversified.com/aws-certified-advanced-networking-prep-route-53/</a></p>
<p><a href="https://www.whizlabs.com/blog/aws-certified-advanced-networking-specialty-certification-preparation/">https://www.whizlabs.com/blog/aws-certified-advanced-networking-specialty-certification-preparation/</a></p>
]]></content:encoded>
    </item>
    <item>
      <title>AWS - CloudFormation - Create VPC</title>
      <link>https://thenetworkstack.com/aws-cloudformation-create-vpc/</link>
      <pubDate>Sat, 27 Jan 2018 20:14:00 +0000</pubDate>
      <guid>https://thenetworkstack.com/aws-cloudformation-create-vpc/</guid>
      <description>&lt;p&gt;If you have worked with AWS networking, you know there is a laundry list of items that need to be initally configured so the environment is ready for use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VPC&lt;/li&gt;
&lt;li&gt;Internet Gateway&lt;/li&gt;
&lt;li&gt;VPN Gateway&lt;/li&gt;
&lt;li&gt;Public Subnets&lt;/li&gt;
&lt;li&gt;Private Subnets&lt;/li&gt;
&lt;li&gt;Public Route Tables&lt;/li&gt;
&lt;li&gt;Private Route Tables&lt;/li&gt;
&lt;li&gt;NAT Gateways&lt;/li&gt;
&lt;li&gt;&lt;em&gt;and more depending on your environment&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since AWS is a software defined cloud datacenter, you will get more and more requests for a &lt;em&gt;Prod environment&lt;/em&gt;, then &lt;em&gt;Dev environment&lt;/em&gt;, then &lt;em&gt;QA environment&lt;/em&gt;, then &lt;em&gt;DevOps environment&lt;/em&gt;, etc&amp;hellip;but wait, this also needs to be done in &lt;strong&gt;every&lt;/strong&gt; region! Instead of spending your time pointing and clicking your way through the AWS GUI, Amazon has provided an infrastructure automation solution called &lt;strong&gt;CloudFormation&lt;/strong&gt;. CloudFormation uses the AWS API&amp;rsquo;s to automate the provisioning of AWS resources, and its very simple to use.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>If you have worked with AWS networking, you know there is a laundry list of items that need to be initally configured so the environment is ready for use:</p>
<ul>
<li>VPC</li>
<li>Internet Gateway</li>
<li>VPN Gateway</li>
<li>Public Subnets</li>
<li>Private Subnets</li>
<li>Public Route Tables</li>
<li>Private Route Tables</li>
<li>NAT Gateways</li>
<li><em>and more depending on your environment</em></li>
</ul>
<p>Since AWS is a software defined cloud datacenter, you will get more and more requests for a <em>Prod environment</em>, then <em>Dev environment</em>, then <em>QA environment</em>, then <em>DevOps environment</em>, etc&hellip;but wait, this also needs to be done in <strong>every</strong> region! Instead of spending your time pointing and clicking your way through the AWS GUI, Amazon has provided an infrastructure automation solution called <strong>CloudFormation</strong>. CloudFormation uses the AWS API&rsquo;s to automate the provisioning of AWS resources, and its very simple to use.</p>
<ol>
<li>Set up your YAML or JSON file that describes your infrastructure</li>
<li>Use the AWS-CLI or GUI to launch (or delete) your infrastructure</li>
</ol>
<p>Luckily AWS has great <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/cloudformation-vpc-template.html">sample docs</a>, and I have added VPN Gateway parts, extra subnets, and my naming scheme to the code below (also available on my <a href="https://github.com/dkuchenski/thenetworkstack-aws/blob/master/cloudformation-vpc-create.yaml">github</a>). YAML is easy to read, so feel free to take and change what you need for your environment:</p>
<pre tabindex="0"><code>Description: 

    This template deploys a VPC, with three public and private subnets spread 
    across three Availability Zones. It deploys an Internet Gateway, with a default 
    route in the public subnets. It deploys three NAT Gateways (one in each AZ), 
    and default routes for them in the private subnets. It deploys a VPN gateway,
    attaches the gateway to the VPC and enables route propagation in all route tables.

Parameters:
    EnvironmentName:
        Description: An environment name that will be prefixed to resource names
        Type: String
        Default: thenetworkstack
    EnvironmentLocation:
        Description: Name of the AWS region that is being used (ex. us-west-2)
        Type: String
        Default: us-west-2
    VpcCIDR:
        Description: Please enter the IP range (CIDR notation) for this VPC
        Type: String
        Default: 10.64.0.0/19
    PublicSubnet1CIDR:
        Description: Please enter the IP range (CIDR notation) for the public subnet in the first Availability Zone
        Type: String
        Default: 10.64.0.0/22
    PublicSubnet2CIDR:
        Description: Please enter the IP range (CIDR notation) for the public subnet in the second Availability Zone
        Type: String
        Default: 10.64.4.0/22
    PublicSubnet3CIDR:
        Description: Please enter the IP range (CIDR notation) for the public subnet in the third Availability Zone
        Type: String
        Default: 10.64.8.0/22
    PrivateSubnet1CIDR:
        Description: Please enter the IP range (CIDR notation) for the private subnet in the first Availability Zone
        Type: String
        Default: 10.64.16.0/22
    PrivateSubnet2CIDR:
        Description: Please enter the IP range (CIDR notation) for the private subnet in the second Availability Zone
        Type: String
        Default: 10.64.20.0/22
    PrivateSubnet3CIDR:
        Description: Please enter the IP range (CIDR notation) for the private subnet in the third Availability Zone
        Type: String
        Default: 10.64.24.0/22
Resources:
    VPC: 
        Type: AWS::EC2::VPC
        Properties:
            CidrBlock: !Ref VpcCIDR
            EnableDnsSupport: True
            EnableDnsHostnames: True
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-vpc
    InternetGateway:
        Type: AWS::EC2::InternetGateway
        Properties:
            Tags:
                - Key: Name
                  Value: !Sub ${EnvironmentName}-igw
    VPNGateway: 
        Type: AWS::EC2::VPNGateway
        Properties: 
            Type: ipsec.1
            Tags: 
                - Key: Name
                  Value: !Sub ${EnvironmentName}-vpg
    InternetGatewayAttachment:
        Type: AWS::EC2::VPCGatewayAttachment
        Properties:
            InternetGatewayId: !Ref InternetGateway
            VpcId: !Ref VPC
    VPNGatewayAttachment:
        Type: AWS::EC2::VPCGatewayAttachment
        Properties:
            VpnGatewayId: !Ref VPNGateway
            VpcId: !Ref VPC
    PublicSubnet1: 
        Type: AWS::EC2::Subnet
        Properties:
            VpcId: !Ref VPC
            AvailabilityZone: !Select [ 0, !GetAZs &#39;&#39; ]
            CidrBlock: !Ref PublicSubnet1CIDR
            MapPublicIpOnLaunch: true
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-public-${EnvironmentLocation}a
    PublicSubnet2: 
        Type: AWS::EC2::Subnet
        Properties:
            VpcId: !Ref VPC
            AvailabilityZone: !Select [ 1, !GetAZs &#39;&#39; ]
            CidrBlock: !Ref PublicSubnet2CIDR
            MapPublicIpOnLaunch: true
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-public-${EnvironmentLocation}b
    PublicSubnet3: 
        Type: AWS::EC2::Subnet
        Properties:
            VpcId: !Ref VPC
            AvailabilityZone: !Select [ 2, !GetAZs &#39;&#39; ]
            CidrBlock: !Ref PublicSubnet3CIDR
            MapPublicIpOnLaunch: true
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-public-${EnvironmentLocation}c
    PrivateSubnet1: 
        Type: AWS::EC2::Subnet
        Properties:
            VpcId: !Ref VPC
            AvailabilityZone: !Select [ 0, !GetAZs &#39;&#39; ]
            CidrBlock: !Ref PrivateSubnet1CIDR
            MapPublicIpOnLaunch: false
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-private-${EnvironmentLocation}a
    PrivateSubnet2: 
        Type: AWS::EC2::Subnet
        Properties:
            VpcId: !Ref VPC
            AvailabilityZone: !Select [ 1, !GetAZs &#39;&#39; ]
            CidrBlock: !Ref PrivateSubnet2CIDR
            MapPublicIpOnLaunch: false
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-private-${EnvironmentLocation}b
    PrivateSubnet3: 
        Type: AWS::EC2::Subnet
        Properties:
            VpcId: !Ref VPC
            AvailabilityZone: !Select [ 2, !GetAZs &#39;&#39; ]
            CidrBlock: !Ref PrivateSubnet3CIDR
            MapPublicIpOnLaunch: false
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-private-${EnvironmentLocation}c
    NatGateway1EIP:
        Type: AWS::EC2::EIP
        DependsOn: InternetGatewayAttachment
        Properties: 
            Domain: vpc
    NatGateway2EIP:
        Type: AWS::EC2::EIP
        DependsOn: InternetGatewayAttachment
        Properties:
            Domain: vpc
    NatGateway3EIP:
        Type: AWS::EC2::EIP
        DependsOn: InternetGatewayAttachment
        Properties:
            Domain: vpc
    NatGateway1: 
        Type: AWS::EC2::NatGateway
        Properties: 
            AllocationId: !GetAtt NatGateway1EIP.AllocationId
            SubnetId: !Ref PublicSubnet1
            Tags:
                - Key: Name
                  Value: !Sub ${EnvironmentName}-${EnvironmentLocation}a
    NatGateway2: 
        Type: AWS::EC2::NatGateway
        Properties:
            AllocationId: !GetAtt NatGateway2EIP.AllocationId
            SubnetId: !Ref PublicSubnet2
            Tags:
                - Key: Name
                  Value: !Sub ${EnvironmentName}-${EnvironmentLocation}b
    NatGateway3: 
        Type: AWS::EC2::NatGateway
        Properties:
            AllocationId: !GetAtt NatGateway3EIP.AllocationId
            SubnetId: !Ref PublicSubnet3
            Tags:
                - Key: Name
                  Value: !Sub ${EnvironmentName}-${EnvironmentLocation}c
    PublicRouteTable:
        Type: AWS::EC2::RouteTable
        Properties: 
            VpcId: !Ref VPC
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-public
    DefaultPublicRoute: 
        Type: AWS::EC2::Route
        DependsOn: InternetGatewayAttachment
        Properties: 
            RouteTableId: !Ref PublicRouteTable
            DestinationCidrBlock: 0.0.0.0/0
            GatewayId: !Ref InternetGateway
    PublicSubnet1RouteTableAssociation:
        Type: AWS::EC2::SubnetRouteTableAssociation
        Properties:
            RouteTableId: !Ref PublicRouteTable
            SubnetId: !Ref PublicSubnet1
    PublicSubnet2RouteTableAssociation:
        Type: AWS::EC2::SubnetRouteTableAssociation
        Properties:
            RouteTableId: !Ref PublicRouteTable
            SubnetId: !Ref PublicSubnet2
    PublicSubnet3RouteTableAssociation:
        Type: AWS::EC2::SubnetRouteTableAssociation
        Properties:
            RouteTableId: !Ref PublicRouteTable
            SubnetId: !Ref PublicSubnet3
    PrivateRouteTable1:
        Type: AWS::EC2::RouteTable
        Properties: 
            VpcId: !Ref VPC
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-private-${EnvironmentLocation}a
    DefaultPrivateRoute1:
        Type: AWS::EC2::Route
        Properties:
            RouteTableId: !Ref PrivateRouteTable1
            DestinationCidrBlock: 0.0.0.0/0
            NatGatewayId: !Ref NatGateway1
    PrivateSubnet1RouteTableAssociation:
        Type: AWS::EC2::SubnetRouteTableAssociation
        Properties:
            RouteTableId: !Ref PrivateRouteTable1
            SubnetId: !Ref PrivateSubnet1
    PrivateRouteTable2:
        Type: AWS::EC2::RouteTable
        Properties: 
            VpcId: !Ref VPC
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-private-${EnvironmentLocation}b
    DefaultPrivateRoute2:
        Type: AWS::EC2::Route
        Properties:
            RouteTableId: !Ref PrivateRouteTable2
            DestinationCidrBlock: 0.0.0.0/0
            NatGatewayId: !Ref NatGateway2
    PrivateSubnet2RouteTableAssociation:
        Type: AWS::EC2::SubnetRouteTableAssociation
        Properties:
            RouteTableId: !Ref PrivateRouteTable2
            SubnetId: !Ref PrivateSubnet2
    PrivateRouteTable3:
        Type: AWS::EC2::RouteTable
        Properties: 
            VpcId: !Ref VPC
            Tags: 
                - Key: Name 
                  Value: !Sub ${EnvironmentName}-private-${EnvironmentLocation}c
    DefaultPrivateRoute3:
        Type: AWS::EC2::Route
        Properties:
            RouteTableId: !Ref PrivateRouteTable3
            DestinationCidrBlock: 0.0.0.0/0
            NatGatewayId: !Ref NatGateway3
    PrivateSubnet3RouteTableAssociation:
        Type: AWS::EC2::SubnetRouteTableAssociation
        Properties:
            RouteTableId: !Ref PrivateRouteTable3
            SubnetId: !Ref PrivateSubnet3
    VPNGatewayRouteProp: 
        Type: &#34;AWS::EC2::VPNGatewayRoutePropagation&#34;
        Properties:
            RouteTableIds: [!Ref PublicRouteTable, !Ref PrivateRouteTable1, !Ref PrivateRouteTable2, !Ref PrivateRouteTable3]
            VpnGatewayId: !Ref VPNGateway
        DependsOn: VPNGatewayAttachment
Outputs: 
    VPC: 
        Description: A reference to the created VPC
        Value: !Ref VPC
    PublicSubnets:
        Description: A list of the public subnets
        Value: !Join [ &#34;,&#34;, [ !Ref PublicSubnet1, !Ref PublicSubnet2, !Ref PublicSubnet3 ]]
    PrivateSubnets:
        Description: A list of the private subnets
        Value: !Join [ &#34;,&#34;, [ !Ref PrivateSubnet1, !Ref PrivateSubnet2, !Ref PrivateSubnet3 ]]
    PublicSubnet1:
        Description: A reference to the public subnet in the 1st Availability Zone
        Value: !Ref PublicSubnet1
    PublicSubnet2: 
        Description: A reference to the public subnet in the 2nd Availability Zone
        Value: !Ref PublicSubnet2
    PublicSubnet3: 
        Description: A reference to the public subnet in the 3rd Availability Zone
        Value: !Ref PublicSubnet3
    PrivateSubnet1:
        Description: A reference to the private subnet in the 1st Availability Zone
        Value: !Ref PrivateSubnet1
    PrivateSubnet2: 
        Description: A reference to the private subnet in the 2nd Availability Zone
        Value: !Ref PrivateSubnet2
    PrivateSubnet3: 
        Description: A reference to the private subnet in the 3rd Availability Zone
        Value: !Ref PrivateSubnet3
    VPNGateway:
        Description: A reference to the VPNGateway created in the VPC
        Value: !Ref VPNGateway
</code></pre><p>Once your YAML file is setup the way you want, you can log into your AWS account and then:</p>
<ol>
<li>Click Services -&gt; CloudFormation -&gt; Create new stack</li>
<li>Click &ldquo;Upload a template to Amazon S3&rdquo; and choose your YAML file</li>
<li>Give the stack a name, ex: prod-us-west-vpc</li>
<li>Change any default parameters if needed, then click &ldquo;Next&rdquo; and &ldquo;Create&rdquo;</li>
</ol>
<p>Your VPC will be created in the region the GUI is set to, and you can easily delete everything you created by deleting the CloudFormation stack.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
