0
0
AWScloud~10 mins

Internet Gateway for public access in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an Internet Gateway resource in AWS CloudFormation.

AWS
Resources:
  MyInternetGateway:
    Type: [1]
Drag options to blanks, or click blank then click option'
AAWS::EC2::InternetGateway
BAWS::EC2::Subnet
CAWS::S3::Bucket
DAWS::EC2::VPC
Attempts:
3 left
💡 Hint
Common Mistakes
Using VPC or Subnet resource types instead of Internet Gateway.
Confusing S3 bucket resource with networking resources.
2fill in blank
medium

Complete the code to attach the Internet Gateway to a VPC.

AWS
Resources:
  AttachGateway:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId: [1]
      InternetGatewayId: !Ref MyInternetGateway
Drag options to blanks, or click blank then click option'
AMySubnet
BMySecurityGroup
CMyRouteTable
DMyVPC
Attempts:
3 left
💡 Hint
Common Mistakes
Using Subnet or Security Group IDs instead of VPC ID.
Confusing Route Table with VPC.
3fill in blank
hard

Fix the error in the route table to enable public internet access through the Internet Gateway.

AWS
Resources:
  PublicRoute:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId: !Ref PublicRouteTable
      DestinationCidrBlock: [1]
      GatewayId: !Ref MyInternetGateway
Drag options to blanks, or click blank then click option'
A192.168.1.0/24
B0.0.0.0/0
C10.0.0.0/16
D255.255.255.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using private IP ranges instead of 0.0.0.0/0.
Using subnet masks instead of CIDR notation.
4fill in blank
hard

Fill both blanks to define a public subnet with a route to the Internet Gateway.

AWS
Resources:
  PublicSubnet:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: [1]
      CidrBlock: 10.0.1.0/24
  PublicRoute:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId: !Ref PublicRouteTable
      DestinationCidrBlock: [2]
      GatewayId: !Ref MyInternetGateway
Drag options to blanks, or click blank then click option'
AMyVPC
BMySubnet
C0.0.0.0/0
D10.0.0.0/16
Attempts:
3 left
💡 Hint
Common Mistakes
Using subnet ID instead of VPC ID for subnet property.
Using private CIDR blocks for route destination.
5fill in blank
hard

Fill all three blanks to create an Internet Gateway, attach it to a VPC, and add a route for public access.

AWS
Resources:
  InternetGateway:
    Type: [1]
  AttachGateway:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId: [2]
      InternetGatewayId: !Ref InternetGateway
  PublicRoute:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId: !Ref PublicRouteTable
      DestinationCidrBlock: [3]
      GatewayId: !Ref InternetGateway
Drag options to blanks, or click blank then click option'
AAWS::EC2::InternetGateway
BMyVPC
C0.0.0.0/0
DAWS::EC2::Subnet
Attempts:
3 left
💡 Hint
Common Mistakes
Using subnet resource type instead of Internet Gateway.
Using subnet ID instead of VPC ID for attachment.
Using private CIDR blocks instead of 0.0.0.0/0 for route.