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 Antwort
1
Akzeptierte Antwort

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
SUPPORT-TECHNIKER
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen