Bird
0
0

Which of the following is the correct way to attach an Internet Gateway to a VPC using AWS CLI?

easy📝 Syntax Q3 of 15
AWS - VPC Fundamentals
Which of the following is the correct way to attach an Internet Gateway to a VPC using AWS CLI?
Aaws ec2 create-internet-gateway --vpc-id vpc-12345678
Baws ec2 associate-internet-gateway --internet-gateway-id igw-12345678 --vpc-id vpc-12345678
Caws ec2 attach-internet-gateway --internet-gateway-id igw-12345678 --vpc-id vpc-12345678
Daws ec2 link-internet-gateway --internet-gateway-id igw-12345678 --vpc-id vpc-12345678
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct AWS CLI command for attachment

    The command to attach an Internet Gateway is 'attach-internet-gateway'.
  2. Step 2: Verify the command syntax

    aws ec2 attach-internet-gateway --internet-gateway-id igw-12345678 --vpc-id vpc-12345678 uses the correct command and parameters.
  3. Final Answer:

    aws ec2 attach-internet-gateway --internet-gateway-id igw-12345678 --vpc-id vpc-12345678 -> Option C
  4. Quick Check:

    Attach Internet Gateway CLI command = attach-internet-gateway [OK]
Quick Trick: Use 'attach-internet-gateway' to link IGW to VPC [OK]
Common Mistakes:
MISTAKES
  • Using 'associate' or 'link' commands which do not exist
  • Trying to create IGW with VPC ID parameter

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes