avatarGonzalo Fernandez Plaza

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

3711

Abstract

onnections between a VPC and supported services without exposing it to the public internet.</p><p id="0f23">There are two types of VPC endpoints:</p><ul><li><b>Interface endpoints</b> → It provides an <a href="https://plazagonzalo.medium.com/ec2-aws-solutions-architect-associate-complete-course-eaf3b641ebb9#175a">Elastic Network Interface</a> as the entry point.</li><li><b>Gateway endpoints</b> → It provides a Gateway Load Balancer endpoint as a target to<b> put in the routing table</b>. <b>We only use these endpoints with <a href="https://readmedium.com/amazon-s3-aws-solutions-architect-da19e7eb21dc">Amazon S3</a> and <a href="https://aws.plainenglish.io/serverless-aws-solutions-architect-associate-c066dec2a732#0895">DynamoDB</a>!</b></li></ul><figure id="0b8b"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*-Thkb9zIc45AbcBSHN1RuA.png"><figcaption>VPC endpoints & VPC Peering in an AWS VPC.</figcaption></figure><h1 id="a507">FLOW LOGS</h1><p id="299f">VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. We can use <a href="https://towardsaws.com/amazon-cloudwatch-explanation-for-the-aws-solutions-architect-associate-exam-b303d0100a71#5a9e">Amazon CloudWatch Logs</a> or <a href="https://readmedium.com/amazon-s3-aws-solutions-architect-da19e7eb21dc#eae2">Amazon S3 Athena</a> to analyze them.</p><figure id="f75d"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*3N2VgpGCPt_HVELvq74rng.png"><figcaption>Flow logs in Amazon CloudWatch (via aws.amazon.com).</figcaption></figure><p id="8d3f">The most typical params that we can capture are:</p><ul><li><b><i>srcaddr</i></b> → The source IP address for incoming traffic.</li><li><b><i>srcport</i></b> → The source port of the traffic.</li><li><b><i>action</i></b> → The action associated with the traffic (ACCEPT or REJECT, depending on the Security Groups and the NACLs).</li></ul><h1 id="6ff6">AWS MANAGED VPN</h1><p id="fe54">You can create an IPsec VPN connection between your remote networks and Amazon VPC over the internet. A VPN creates a <b>private network connection between devices through the internet</b>. VPNs are used to safely and anonymously transmit data over public networks, and can be configured to <b>encrypt data over the shared </b>connection.</p><p id="aad8">To create this connection, we would need the following services:</p><ul><li><b>Site-to-Site VPN Connection</b> → A secure connection between your on-premises equipment and your VPCs.</li><li><b>Virtual Private Gateway</b> → Gateway for the Amazon side of the Site-to-Site VPN connection. It’s used <b>on the VPC</b> to allow this Site-to-site connection.</li><li><b>Customer Gateway</b> → Physical or software appliance that you own or manage in your <b>on-premises network </b>to allow this Site-to-site connection.</li></ul><figure id="3dbe"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*uDaUsKv8ufH0JldT.png"><figcaption>Establishing a site-to-site connection between your VPC and on-premise network (via docs.aws.amazon.com).</figcaption></figure><h1 id="77b4">DIRECT CONNECT</h1><p id="56b1">AWS Direct Connect is a cloud service that links your on-premise network directly to your AWS VPC in a private way, bypassing the internet to deliver more consistent, lower-latency performance. It’s important to know that this connection is not encrypted, but it’s private.</p><p id="517d">As we can see in the following diagram, we connect the client’s on-premise data network to the AWS Direct Connect Location using a Direct Connect endpoint that we will use to establish a connection with AWS.</p><figure id="d90

Options

6"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*H2-iFtAfuXkq9eGZI6hNrg.png"><figcaption>AWS Direct Connect.</figcaption></figure><p id="765a">There is just one problem, what if we want to connect our on-premise network to many different AWS VPCs? In that case, we can use <b>Direct Connect Gateway</b>. You can also connect to different VPCs in different regions.</p><ul><li><b>Connect to one region with different VPCs</b> → You connect the Direct Connect Gateway to a Transit Gateway (we will study this service below).</li></ul><figure id="63f3"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*W5QHvWvPYN19uwQtkqanQQ.png"><figcaption>AWS Direct Connect Gateway with Transit Gateway.</figcaption></figure><ul><li><b>Connect to different regions</b> → You connect the Direct Connect Gateway to Virtual Private Gateways, as shown in the following diagram.</li></ul><figure id="1614"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*_ZoY2UVqYDmlyfm9FT_NnA.png"><figcaption>AWS Direct Connect Gateway with Virtual Private Gateway.</figcaption></figure><h1 id="bbbc">AWS PRIVATELINK</h1><p id="9882">AWS PrivateLink allows you to<b> expose a service to the VPCs/on-premise networks that you want in a private way</b>. It uses Network Load Balancers to expose services, and the client would only need an ENI endpoint to connect to these provided services.</p><figure id="19cb"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*sWats7DnZUMU4gKjAOWBcQ.png"><figcaption></figcaption></figure><p id="8b2c">If the exam asks you to privately connect a service to hundreds of VPCs, or even use Network Load Balancers to do it, this will be the chosen one.</p><h1 id="6fa2">AWS VPN CLOUDHUB</h1><p id="49d3">It allows us to <b>establish secure communications between multiple on-premise networks. </b>This is its main functionality, establishing secure connections between your on-premises networks, but you can also include your AWS VPCs. The following diagram shows that we can connect the Customer Network Office of New York with Los Angeles using AWS CloudHub.</p><figure id="7986"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*OeEVBdBYpi6XuQkr.png"><figcaption>AWS CloudHub (via docs.aws.amazon.com).</figcaption></figure><h1 id="7fc3">AWS TRANSIT GATEWAY</h1><p id="8b18">It connects VPCs and on-premises networks through a central hub, acting as a cloud router. Imagine you want to connect with ten different VPCs from your on-premise network. You can create an AWS Transit Gateway with these ten VPCs and establish a connection once, <b>as it’s a transitive service</b>. You can gather VPCs that are even in different regions.</p><figure id="6324"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*tMEd1DSKfJ0ol-j-1On5OQ.png"><figcaption>AWS Transit Gateway (via aws.amazon.com).</figcaption></figure><h1 id="5b9b">OTHER NETWORK SERVICES</h1><ul><li><b>Bastion Hosts</b> → Server aims to provide access to a private network from the internet. <b>You can access your instances in a private network using SSH</b>.</li><li><b>Egress-only Internet Gateway</b> → Allows outbound communication <b>over IPv6</b> from instances in your VPC to the Internet.</li></ul><h1 id="dae6">Thanks for Reading!</h1><p id="2d1f"><i>If you like my work and want to support me…</i></p><ol><li><i>You can follow me on Medium <a href="https://plazagonzalo.medium.com/">here</a>.</i></li><li><b><i>Feel free to clap</i></b><i> if this post is helpful for you! :)</i></li><li><b><i>More AWS practice exam questions</i></b><i>? Find them at <a href="https://www.fullcertified.com/">FullCertified.com</a>!</i></li></ol></article></body>

AWS Networking (Part 2) — AWS Solutions Architect Associate Complete Course

Chapter 21: Networking in AWS Part 2

Last week, I published the first part of the chapter on Networking in Amazon Web Services. As this is quite an important topic, which the AWS Solutions Architect Associate Exam will ask quite a lot, I have divided it into two parts. We will see more services in this last part than in the previous chapter, but they are less complex than the others. Let’s get on with it!

Networking Fundamentals (part 2) for the AWS Solutions Architect Associate Certification.
  1. VPC peering
  2. VPC endpoints
  3. Flow logs
  4. AWS Managed VPN
  5. Direct Connect & Direct Connect Gateway
  6. AWS Private Link
  7. VPN Cloudhub
  8. Transit Gateway
  9. Other network services

Remember that all the chapters from the course can be found in the following link:

VPC PEERING

VPC peering allows you to connect two private VPCs using IP addresses, acting like a VPC. Instances in either VPC can communicate as if they are within the same network. It even works with VPCs from different regions.

The only requirement is that the CIDR of the subnets cannot overlap. You also need to update the route table of each VPC. This will allow the instances to communicate with each other.

AWS VPC Peering connection (via docs.aws.amazon.com)

VPC peering is not transitive. What does it mean? If we had two VPCs connected to VPC A, for example, VPC B and VPC C, as shown in the following diagram, they could not establish a connection between them. You would need another VPC peering connection between them to allow it.

AWS VPC Peering connection diagram.

VPC ENDPOINTS

What if we want to establish a connection between an AWS service (for example, Amazon S3) and the instances from your private network? As we saw in the last chapter, you can do it, but the connection would be using the internet. What if we don’t want this traffic to be public? That’s why we use VPC endpoints. A VPC endpoint enables connections between a VPC and supported services without exposing it to the public internet.

There are two types of VPC endpoints:

  • Interface endpoints → It provides an Elastic Network Interface as the entry point.
  • Gateway endpoints → It provides a Gateway Load Balancer endpoint as a target to put in the routing table. We only use these endpoints with Amazon S3 and DynamoDB!
VPC endpoints & VPC Peering in an AWS VPC.

FLOW LOGS

VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. We can use Amazon CloudWatch Logs or Amazon S3 Athena to analyze them.

Flow logs in Amazon CloudWatch (via aws.amazon.com).

The most typical params that we can capture are:

  • srcaddr → The source IP address for incoming traffic.
  • srcport → The source port of the traffic.
  • action → The action associated with the traffic (ACCEPT or REJECT, depending on the Security Groups and the NACLs).

AWS MANAGED VPN

You can create an IPsec VPN connection between your remote networks and Amazon VPC over the internet. A VPN creates a private network connection between devices through the internet. VPNs are used to safely and anonymously transmit data over public networks, and can be configured to encrypt data over the shared connection.

To create this connection, we would need the following services:

  • Site-to-Site VPN Connection → A secure connection between your on-premises equipment and your VPCs.
  • Virtual Private Gateway → Gateway for the Amazon side of the Site-to-Site VPN connection. It’s used on the VPC to allow this Site-to-site connection.
  • Customer Gateway → Physical or software appliance that you own or manage in your on-premises network to allow this Site-to-site connection.
Establishing a site-to-site connection between your VPC and on-premise network (via docs.aws.amazon.com).

DIRECT CONNECT

AWS Direct Connect is a cloud service that links your on-premise network directly to your AWS VPC in a private way, bypassing the internet to deliver more consistent, lower-latency performance. It’s important to know that this connection is not encrypted, but it’s private.

As we can see in the following diagram, we connect the client’s on-premise data network to the AWS Direct Connect Location using a Direct Connect endpoint that we will use to establish a connection with AWS.

AWS Direct Connect.

There is just one problem, what if we want to connect our on-premise network to many different AWS VPCs? In that case, we can use Direct Connect Gateway. You can also connect to different VPCs in different regions.

  • Connect to one region with different VPCs → You connect the Direct Connect Gateway to a Transit Gateway (we will study this service below).
AWS Direct Connect Gateway with Transit Gateway.
  • Connect to different regions → You connect the Direct Connect Gateway to Virtual Private Gateways, as shown in the following diagram.
AWS Direct Connect Gateway with Virtual Private Gateway.

AWS PRIVATELINK

AWS PrivateLink allows you to expose a service to the VPCs/on-premise networks that you want in a private way. It uses Network Load Balancers to expose services, and the client would only need an ENI endpoint to connect to these provided services.

If the exam asks you to privately connect a service to hundreds of VPCs, or even use Network Load Balancers to do it, this will be the chosen one.

AWS VPN CLOUDHUB

It allows us to establish secure communications between multiple on-premise networks. This is its main functionality, establishing secure connections between your on-premises networks, but you can also include your AWS VPCs. The following diagram shows that we can connect the Customer Network Office of New York with Los Angeles using AWS CloudHub.

AWS CloudHub (via docs.aws.amazon.com).

AWS TRANSIT GATEWAY

It connects VPCs and on-premises networks through a central hub, acting as a cloud router. Imagine you want to connect with ten different VPCs from your on-premise network. You can create an AWS Transit Gateway with these ten VPCs and establish a connection once, as it’s a transitive service. You can gather VPCs that are even in different regions.

AWS Transit Gateway (via aws.amazon.com).

OTHER NETWORK SERVICES

  • Bastion Hosts → Server aims to provide access to a private network from the internet. You can access your instances in a private network using SSH.
  • Egress-only Internet Gateway → Allows outbound communication over IPv6 from instances in your VPC to the Internet.

Thanks for Reading!

If you like my work and want to support me…

  1. You can follow me on Medium here.
  2. Feel free to clap if this post is helpful for you! :)
  3. More AWS practice exam questions? Find them at FullCertified.com!
Networking
Aws Solutions Architect
Aws Privatelink
AWS
Cloud Computing
Recommended from ReadMedium