VPCs Flashcards

1
Q

From a resilience perspective, what is the difference between a NAT instance and a NAT gateway?

A

A NAT instance are individual EC2 instances, NAT Gateways are highly available and spread over multiple AZs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do NAT instances and NAT gateways allow?

A

NAT instances and NAT gateways allow your private subnets to access the internet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a VPC?

A

Virtual Private Cloud (VPC) is a logically isolated section of AWS where you can launch resources in your own virtual network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Bastion or jump box used for?

A

A Bastion is an instance in a public subnet that allows you to ssh to an instance in your private subnet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is VPC peering?

A

VPC peering is the connection of one VPC to another via a direct network route.

VPC peering means that instances behave as if they were on the same private network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can VPC peering occur between regions?

A

Yes you can peer VPCs between regions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Can subnets in a VPC span availability zones?

A

No subnets cannot span availability zones.

1 subnet = 1 availability zone

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you enable an instance in your private subnet to access the internet using a NAT Gateway?

A

You use a route table update to link your private subnet to the NAT Gateway which has access out to the internet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

By default, does a new NACL deny or allow all traffic?

A

By default a new NACL denies all traffic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Are NAT Gateways or Instances resilient?

A

NAT Gateways are resilient.

NAT Instances are single EC2 instances with specially configured routing tables. They can also become overwhelmed if they are dealing with the traffic for thousands of other EC2 instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

On what does the amount of traffic that a NAT instance can support depend?

A

The size of the instance determines the amount of traffic that a NAT instance can support

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Where is a NAT instance in relation to a security group?

A

A NAT instance will be behind a security group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Do you need to patch NAT instances and NAT gateways?

A

You need to patch NAT instances but not NAT gateways

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Are NAT gateways redundant?

A

NAT gateways are redundant inside an AZ.

However if you have instances in multiple AZs and they share one NAT instance in a single AZ, then an outage in that AZ will mean no internet connectivity. You should use a NAT gateway in each AZ.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When creating a new VPC does the default network ACL allow or deny all outbound and inbound traffic?

A

A default NACL automatically allows all outbound and inbound traffic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Do custom NACLS by default allow or deny all inbound and outbound traffic?

A

By default, all custom NACLS deny all inbound and outbound traffic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the flow of traffic when using Global Accelerator?

A

Traffic from the user client > Edge Location > Global Accelerator > Endpoint Group > Endpoint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Do you have to associate a subnet with a NACL?

A

Yes all subnets need to be associated with a NACL. If you don’t assign a NACL, then the default NACL gets associated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Do you block IP addresses with NACLs or Security Groups?

A

You block IP addresses with NACLs and not Security Groups

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the link between NACLs and Subnets?

A

You can associate a NACL with multiple subnets, but each subnet can only be associated with one NACL at any time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Do NACLs or Security Groups have a numbered list of rules that is evaluated in number order?

A

NACLs have a numbered list of rules that is evaluated in number order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What are VPC Flow Logs?

A

VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network instances in your VPC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How is VPC Flow Log data stored?

A

VPC Flow Log data is stored using CloudWatch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

At what levels can VPC Flow Logs be created?

A

VPC Flow Logs can be created at VPC, Subnet and Network Interface levels.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Can you enable VPC Flow Logs for peered VPCs?

A

You can only enable VPC Flow Logs for peered VPCs if they are in your account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Can you change the configuration of a VPC Flow Log once created?

A

No you cannot changed the configuration of a VPC Flow Log once created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What IP traffic is not monitored by VPC Flow logs?

A

Traffic not monitored by VPC Flow Logs includes:

  • Any traffic to AWS DNS servers
  • Any Windows traffic for licence activation
  • Traffic to and from 169.254.169.254 for instance metadata
  • DHCP traffic
  • Traffic to the reserved IP address for the default VPC router
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is a Bastion Host?

A

A Bastion Host is a specially hardened computer on a network designed and configured to withstand attacks.

It generally contains minimal applications or services and is generally used in order to connect to instances in a private subnet from a public subnet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What is the difference between Bastions and NAT Gateways / NAT Instances?

A

Bastions are used to securely administer EC2 instances in private subnets. NAT Gateways / Instances are used to enable internet access to EC2 instances in a private subnet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is Direct Connect?

A

AWS Direct Connect establishes a dedicated network connection from your premises to AWS without traversing the internet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

When would you use Direct Connect?

A

You would use Direct Connect for high throughput workloads and to provide a stable, reliable and secure connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What is Global Accelerator?

A

Global Accelerator directs traffic to optimal endpoints over the AWS Global network to optimise performance and availability.

Rather than hopping across multiple networks, Global Accelerator allows you to leverage the AWS Network directly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What are the components of Global Accelerator?

A

The Global Accelerator components are:

  • 2 Static IP addresses to associate with your accelerator
  • Accelerator
  • DNS Name
  • Network Zone
  • Listener
  • Endpoint Group
  • Endpoint
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What is a Listener?

A

A Listener processes inbound connections from clients to Global Accelerator based on port range and protocol that you configure.

You tell a listener on what port numbers you want to listen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What AWS services can endpoints be?

A

Endpoints can be:

  • Network Load Balancers
  • Application Load Balancers
  • EC2 instances
  • Elastic IP addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What is a VPC Endpoint?

A

A VPC Endpoint enables you to connect your VPC to supported AWS services without needing an Internet Gateway, NAT device or VPN connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

What are the two types of VPC Endpoint?

A

Interface and Gateway Endpoints are the two types of VPC Endpoint.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What services do Gateway Endpoints currently support?

A

Gateway Endpoints currently support S3 and DynamoDB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

What is an Interface Endpoint?

A

An interface endpoint is an elastic network interface (ENI) with a private IP address that serves as an entry point for traffic destined to a supporting AWS service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

What is AWS PrivateLink?

A

AWS PrivateLink is a way to expose an application in your VPC to tens, hundreds or thousands of customer VPCs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

What is required to enable PrivateLink?

A

PrivateLink requires a Network Load Balancer on the Service VPC and an ENI on the customer VPC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

What is not required to enable PrivateLink?

A

PrivateLink does not require any VPC peering, route tables, NAT or IGWs.

43
Q

What does AWS Transit Gateway enable?

A

Transit Gateway allows you to have transitive peering between thousands of VPCs and on-premise data centres in a hub/spoke model.

44
Q

What is VPN CloudHub?

A

VPN CloudHub is a means to connect together multiple sites that each have their own VPN connection.

45
Q

Does VPN CloudHub traverse the internet?

A

Yes CloudHub does traverse the internet but all traffic is encrypted.

46
Q

What are two tips to save money on Network costs?

A

In order to save money or Network costs:

  • Use private IP addresses over public ones as this uses the AWS backbone network saving costs
  • Group EC2 instances in the same AZ (although this will provide single point of failure issues)
47
Q

What is created when you setup a new VPC?

A

By default a Route Table, a NACL and a Default Security Group are created when you setup a VPC.

No subnets or IGWs will be created

48
Q

How many IGWs can you connect to your VPC?

A

You can only connect one IGW to your VPC

49
Q

What should you do if your NAT instance is proving to be a bottleneck?

A

If your NAT instance is a bottleneck then you should increase the instance size

50
Q

What do autoscaling groups provide?

A

Autoscaling groups provide high availability

51
Q

What are the different levels on which NACLs and Security Groups operate?

A

NACLs operate on the subnet level whereas Security Groups operate on the instance level

52
Q

What is the difference when connecting to other AWS services using a NAT Gateway or a VPC Endpoint?

A

In contrast to a NAT gateway, traffic between your VPC and other services do not leave the Amazon network when using VPC gateway endpoints.

53
Q

What is a Gateway VPC endpoint?

A

A Gateway VPC endpoint is a gateway that you specify as a target for a route in your route table for traffic destined to a supported AWS service (S3 and DynamoDB).

54
Q

What is the purpose of an egress-only internet gateway?

A

The purpose of an egress-only internet gateway is to allow IPv6 based traffic within a VPC to access the internet, whilst denying any internet based resources to connection back into the VPC.

55
Q

By default does a Security Group include any rules?

A

By default, a security group includes an outbound rule that allows all outbound traffic.

56
Q

What is an Elastic IP address?

A

An Elastic IP address is a public IPv4 address, which is reachable from the internet.

If your instance does not have a public IPv4 address, you can associate an Elastic IP address with your instance to enable communication with the internet.

57
Q

How many VPCs can you have without asking AWS for more?

A

You can have up to five Amazon VPCs per AWS account per AWS Region, but you can place a support request to increase the number.

58
Q

Does your instance retain the same public IP address when re-started?

A

AWS releases your instance’s public IP address when it is stopped, hibernated, or terminated.

Your stopped or hibernated instance receives a new public IP address when it is started.

59
Q

Can you run penetration tests own your AWS infrastructure?

A

AWS customers are welcome to carry out security assessments or penetration tests against their AWS infrastructure without prior approval for 8 services only.

You should request authorization for other simulated events.

60
Q

What service should you think of if there is a question about peering tens, hundreds or thousands of VPCs?

A

For such a peering you should consider PrivateLink

61
Q

When would you use a Gateway endpoint vs an Interface endpoint?

A

• Use Gateway Endpoint if the AWS service is either DynamoDB or S3.

• Use Interface Endpoint for everything else.

62
Q

A Security group is the firewall of ???

A

A Security group is the firewall of EC2 Instances.

63
Q

A Network ACL is the firewall of ???

A

A Network ACL is the firewall of the VPC Subnets.

64
Q

Do NACLS or Security Groups need to be explicitly assigned?

A

Network ACLs are applicable at the subnet level, so any instance in the subnet with an associated NACL will follow rules of NACL. That’s not the case with security groups, security groups has to be assigned explicitly to the instance.

65
Q

Does a Security Group or a NACL support allow rules only?

A

Security group supports allow rules only (by default all rules are denied).

Network ACL supports allow and deny rules. By deny rules, you could explicitly deny a certain IP address to establish a connection.

66
Q

Does a Security Group or a NACL apply the rules in order?

A

All rules in a security group are applied whereas rules are applied in their order (the rule with the lower number gets processed first) in Network ACL.

67
Q

What is the ratio of NACLs to Subnets and Security Groups to Instances?

A

Subnet can have only one NACL, whereas Instance can have multiple Security groups.

68
Q

From the perspective of allowing internet connectivity to instances, what is the difference between Internet Gateways and NAT Gateways?

A

Internet Gateway (IGW) allows instances with public IPs to access the internet whereas NAT Gateway (NGW) allows instances with no public IPs to access the internet.

69
Q

What is the bandwidth limit of internet connectivity with an Internet Gateway?

A

The only limitation on bandwidth is the size of the Amazon EC2 instance, and it applies to all traffic — internal to the VPC and out to the Internet.

70
Q

What causes a subnet to be deemed a Public Subnet?

A

A subnet is deemed to be a Public Subnet if it has a Route Table that directs traffic to the Internet Gateway.

71
Q

What are the two main differences between an Internet Gateway and a NAT Gateway?

A
  1. A NAT Gateway allows resources in a private subnet to access the internet (think yum updates, external database connections, wget calls, OS patch, etc).
  2. A NAT Gateway only works one way. The internet at large cannot get through your NAT to your private resources unless you explicitly allow it.
72
Q

What is the bandwidth limit of internet connectivity with a NAT Gateway?

A

A NAT gateway supports 5 Gbps of bandwidth and automatically scales up to 45 Gbps. (a NAT Instance is limited to the bandwidth associated with the EC2 instance type).

73
Q

Based on what does Global Accelerator route traffic to optimal AWS endpoints?

A

Global Accelerator routes traffic to optimal AWS endpoints based on:

  • Endpoint health
  • Client locations
  • User-configured weights
74
Q

What are the Global Accelerator types?

A

The 2 Global Accelerator types are:

  • Standard Accelerator
  • Custom-routing Accelerator
75
Q

What is the routing difference between Standard and Custom-routing Global Accelerator types?

A

Standard Accelerators automatically route traffic to a healthy endpoint nearest your user whereas Custom-routing Accelerators allow you to use your application logic to directly route to specific EC2 endpoints.

76
Q

What endpoint types does Global Accelerator support?

A

Standard Accelerators support:

  • Network Load Balancers
  • Application Load Balancers
  • EC2
  • and Elastic IPs as endpoints.

Custom-routing Accelerators support only VPC subnet endpoints

77
Q

What must you do in order to ensure that an ip can be blocked by a NACL?

A

In order to ensure that an ip is blocked you need to put the rule before the http / https ALLOW rule

78
Q

What is the ratio between NACLs and subnets?

A

A NACL can be associated with multiple subnets, but a subnet can only be associated with one NACL

79
Q

What happens if you don’t associated a subnet with a NACL?

A

If you don’t associate a subnet with a NACL then it gets associated to the default NACL

80
Q

Do you block IP addresses with Security Groups or NACLs?

A

You block specific IP addresses with NACLs

81
Q

Do NACLs by default allow or deny inbound and outbound traffic?

A

Default NACLs allow all inbound and outbound traffic, Custom NACLs deny all inbound and outbound traffic

82
Q

What is used to provide internet traffic to EC2 instances in private subnets?

A

A NAT Gateway or NAT instance is used to provide internet traffic to EC2 instances in private subnets

83
Q

What is X-Connect?

A

X-Connect is how the Direct Connect routers are linked

84
Q

What is an accelerator?

A

An accelerator directs traffic to optimal endpoints over the AWS global network to improve availability and performance of internet apps

Each accelerator includes one or more listeners

85
Q

What are Global Accelerator Endpoint Groups?

A

An endpoint group routes requests to one or more registered endpoints in AWS Global Accelerator.

When you add a listener in a standard accelerator, you specify the endpoint groups for Global Accelerator to direct traffic to. An endpoint group, and all the endpoints in it, must be in one AWS Region. You can add different endpoint groups for different purposes, for example, for blue/green deployment testing.

86
Q

Regarding where they are, what is the difference between an interface and gateway endpoint?

A

diagram

87
Q

What are the methods available to open applications in your VPC to other VPCs?

A

To open your VPC to other VPCs you can:

  • Open the VPC to the internet
  • VPC peering
  • PrivateLink Connection
88
Q

What is the only service that supports IP multicast?

A

Transit Gateway is the only service that supports IP multicast

89
Q

What is the best service to use to simplify a complicated network topology?

A

Transit Gateway is the best service to use to simplify a complicated topology

90
Q

If connecting to your services using a Private IP address, is that free?

A

If the service you connect to is in the same AZ then there is no cost. There will be a cost if the service instance is in a different AZ

91
Q

What architecture should you use in order to keep your networking cost free?

A

In order for cost free networking you should group all your EC2 instances in the same AZ.

This does mean however that you will have single point of failure concerns

92
Q

What must you remember to do when creating a NAT instance?

A

When creating a NAT instance you must remember to disable source/destination check on that instance

93
Q

Where must NAT instances be hosted?

A

NAT instances must be hosted in a public subnet

94
Q

Are NAT Gateways redundant?

A

NAT Gateways are redundant inside the AZ

So any resources in another AZ using the Gateway should ideally use their own Gateway

95
Q

Can VPC flow logs be enabled for VPCs that are peered with your VPC?

A

You can only enable Flow Logs for peered VPCs if they are in your account

96
Q

To provide internet connectivity what are Internet and NAT Gateways connected to ?

A

You attach an Internet Gateway to your VPC, whereas NAT Gateways are attached to your subnets to give them a route to the internet

97
Q

What would you use to enable an instance in your private subnet to access AWS services without leaving the AWS network?

A

To reach services without leaving the AWS network or going across the internet you would use a VPC Gateway Endpoint

98
Q

What is the difference between VPC gateway endpoint and VPC interface endpoint?

A

A VPC Gateway Endpoint serves as a target for a route in your route table for traffic destined for the service.

A VPC Interface Endpoint uses an elastic network interface (ENI) as an entry point for traffic destined to the service.

99
Q

What are VPC Flow Logs used for?

A

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.

100
Q

What is a Customer Gateway?

A

A customer gateway is a resource that you create in AWS that represents the physical customer gateway device in your on-premises network.

101
Q

What is a Bastion used for?

A

A Bastion host allows you to securely administer (via SSH or RDP) an EC2 instance located in a private subnet.

102
Q

What is an Elastic IP address?

A

An Elastic IP address is a public IPv4 address, which is reachable from the internet. If your instance does not have a public IPv4 address, you can associate an Elastic IP address with your instance to enable communication with the internet.

103
Q

How do security groups work?

A

Security groups control access at the instance-level (as they are associated with network interfaces), they support “allow” rules only, and they evaluate all rules before deciding whether to allow traffic into the instance(s).

104
Q

To where can VPC Flow Log data be published?

A

Flow log data can be published to Amazon CloudWatch Logs or Amazon S3.