Does AWS Fargate always use a VPC?
Does Fargate always use a VPC? And if you don't specify a VPC, it uses the default VPC in the customer account? And if you don't have a default VPC, it creates it for you?
The ClusterProps definition in the CDK guide for Python say:
vpc (Optional[IVpc]) – The VPC where your ECS instances will be running or your ENIs will be deployed. Default: - creates a new VPC with two AZs
So it seems like, in this regard ECS Fargate is not like AWS Lambda, where you can either run functions without a VPC (the default for AWS Lambda, a VPC 100% transparent to the user), or select a VPC. If Fargate always uses a VPC, I suppose the reason is because container-technologies are tightly bound to IP-based private and public network, unlike AWS Lambda, which uses ARNs.
Yes, Fargate requires a VPC which is (as you point out) different to how Lambda operates.
@grahamschuckman makes sense! I guess everything that has private IPs has a VPC, putting the P in VPC.
Hello,
AWS Fargate is a Serverless Container platform where you can run containers on EC2 instances managed by AWS. This relieves customers from provisioning, configuring, or scaling of VMs to run containers. The compute instances (powered by Firecracker) are microVMs that run in AWS managed VPCs (invisible to customers).
This article seems to be more about how the compute aspects of Fargate work under the hood, like runtime, etc. Where can I find evidence that there is an option to run Fargate in AWS-managed (invisible) VPCs?
Relevant questions
Recreate a default VPC within my Classic Platform
Accepted Answerasked 6 days agoDoes Elastic Beanstalk require the use of a Default VPC?
Accepted Answerasked 6 years agoVPC peering with a VPC from a different AWS Organization - cost implications
Accepted Answerasked 2 years agoHow does GuardDuty work in a Shared VPC?
Accepted AnswerQuestion about creating a VPC using the CLI
Accepted Answerasked 2 years agoAccess CloudDirectory from inside a VPC
asked 3 years agoDoes AWS Fargate always use a VPC?
Accepted Answerasked 14 days agoDid you know how to clone a VPC
asked 5 months agoWhy in this tutorial VPC creates NAT gateways
Accepted Answerasked 4 months agoDo we need VPC Endpoints for SNS and SQS if data not originating from any VPC and directly landing in SNS from external source
asked 6 months ago
Is this because with Fargate, a task has an IP address associated with it, whereas Lambda does not? Therefore since an IP address is being allocated, a VPC is required?