ECS Fargate task fails with InvalidDhcpOptionID.NotFound

0

Trying to launch an ECS Fargate task in a VPC that does not have a DHCP option set. The task fails with: Unexpected EC2 error while getting DHCP options for VPC vpc-NNNN: InvalidDhcpOptionID.NotFound.

Is DHCP option set required? How is it being used? Is there a workaround other than setting a DHCP option set? Thanks.

1回答
0

Hello,

Is DHCP option set required?

DHCP option set is required in order to run ECS Fargate tasks in your VPC.

How is it being used?

  • DHCP option set provides DNS nameserver configuration for your VPC.
  • When you create an EC2 instance, the /etc/resolv.conf file gets populated with the nameserver configuration that you specify in the DHCP option sets for your VPC. All of the DNS queries within the EC2 instance uses the nameserver provided in the /etc/resolv.conf to perform DNS resolution.
  • While using ECS Fargate, your tasks will run on EC2 instances that are managed by AWS.
  • The underlying EC2 instance (managed by AWS) will use your DHCP option sets to configure nameserver configuration to perform DNS resolution.
  • Even your ECS tasks will use the nameserver provided in the DHCP option sets to perform DNS resolution.

Is there a workaround other than setting a DHCP option set?

As you can understand from the above information, it is not possible for ECS Fargate to perform its functionalities without enabling the DHCP option sets for your VPC.

I hope this helps!

profile pictureAWS
サポートエンジニア
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ