how can we assign vpcid while creating a ecs service under ecs cluster through .net aws sdk?

0

Hi Team,

I have created a ECS TaskDefinition then I am creating a ecs cluster. Inside cluster I want to create a service through .net awssdk 2.3.55.2 classes. But I am not able to set vpcid under NetworkConfiguration or AwsVpcConfiguration class. Our code is automatically assigning very first vpcid while creating ecs service. Can you please suggest how can I assign/set vpcid which we require instead of selecting first entry from vpc list? Due to this issue my websites are not launching on containers as containers/service doesn't have correct vpcid assigned. Thanks

1回答
1
承認された回答

You can specify a list of subnet IDs from your VPC in the Amazon.ECS.Model.AwsVpcConfiguration object as shown in the AWS SDK doc.

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

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

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

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

関連するコンテンツ