Does AWS Fargate always use a VPC?

0

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.

1개 답변
3
수락된 답변

Yes, Fargate requires a VPC which is (as you point out) different to how Lambda operates.

profile pictureAWS
전문가
답변함 2년 전
profile picture
전문가
검토됨 한 달 전
  • 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?

  • @grahamschuckman makes sense! I guess everything that has private IPs has a VPC, putting the P in VPC.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠