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)