1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
0
Hello.
How about specifying your own ALB with the parameter "loadBalancer"?
I thought that if you created your own ALB, you could choose any subnet you like.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedFargateService.html
The code will look like this:
const loadBalancedFargateService = new ecsp.ApplicationLoadBalancedFargateService(this, 'SampleWebService', {
cluster,
memoryLimitMiB:512,
desiredCount:1,
cpu:256,
taskImageOptions: {
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
loadBalancer:alb, // <-- your ALB
openListener:false,
});
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 5 Monaten
