📚

The specified capacity provider name is invalid

に公開

Amazon ECS のキャパシティプロバイダーを CDK で作ろうとしてたらエラー

Invalid request provided: CreateCapacityProvider error: The specified capacity provider name is invalid. Up to 255 characters are allowed, including letters (upper and lowercase), numbers, underscores, and hyphens. The name cannot be prefixed with "aws", "ecs", or "fargate". Specify a valid name and try again.

接頭語に「aws」「ecs」「fargate」が使えないらしい。
AWS コンソールにも書いてあった。

アルファベット (大文字と小文字)、数字、アンダースコア、ハイフンを含めて最大 255 文字を使用できます。名前の前に「aws」、「ecs」、または「fargate」を付けることはできません。

Discussion