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년 전

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

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

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

관련 콘텐츠