How to create an Internet Gateway using Boto3?

0 votes

Hi Guys,

I have created one VPC using the Boto3 module. Now I want to create an internet gateway with the help of Boto3. How can I do that?

Oct 9 in AWS by MD
• 79,350 points
91 views

1 answer to this question.

0 votes

Hi@MD,

You can control internet access to the instances in your VPC. If you want to make your EC2 instances available on the internet, then you have to first create an Internet Gateway and then attach it to your VPC. 

# create an internet gateway and attach it to VPC
internetgateway = ec2.create_internet_gateway()
vpc.attach_internet_gateway(InternetGatewayId=internetgateway.id)
answered Oct 10 by akhtar
• 33,450 points

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

How to create Internet Gateway using AWS CLI?

It is simple to create an Internet ...READ MORE

answered Feb 21, 2019 in AWS by Priyaj
• 57,700 points
140 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to create EFS in AWS?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jun 20 in AWS by akhtar
• 33,450 points
138 views
0 votes
2 answers

How to rename a S3 bucket name?

Hi, You can rename your S3 bucket name. ...READ MORE

answered Oct 4 in AWS by akhtar
• 33,450 points
17,325 views