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 Respuesta
1
Respuesta aceptada

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
INGENIERO DE SOPORTE
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas