How to attach an Internet Gateway to a VPC

0 votes
Can someone help me with the command for attaching an Internet Gateway to a VPC?
Feb 21, 2019 in AWS by Sukanya
868 views

1 answer to this question.

0 votes

To attach an Internet Gateway to a VPC using AWS CLI you must know your Internet Gateway ID and Your VPC Id. 

To attach you can use the following command:-

C:\Users\priyj_kumar>aws ec2 attach-internet-gateway --internet-gateway-id igw-0185c098195ba1d1a --vpc-id vpc-0aca683c37231c12f

This way you can attach your Internet Gateway to your VPC.

You can verify it using your AWS Console

Here you can see that your Internet Gateway is attached to your VPC.

Hope it helps

answered Feb 21, 2019 by Priyaj
• 58,090 points

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

How do I configure and attach an internet gateway for use with Elastic Load Balancing?

Follow these steps: First, create an internet gateway and ...READ MORE

answered May 16, 2019 in AWS by Archu
3,339 views
0 votes
1 answer

How to create an Internet Gateway using Boto3?

Hi@MD, You can control internet access to the ...READ MORE

answered Oct 10, 2020 in AWS by akhtar
• 38,230 points
1,120 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP