In the container example, is it possible to use Fa...
# aws
b
In the container example, is it possible to use Fargate without load balancer?
Copy code
//const lb = new awsx.lb.NetworkListener("nginx", { port: 80 });
const service = new awsx.ecs.FargateService("nginx", {
    // cluster,
    taskDefinitionArgs: {
        containers: {
            nginx: {
                image: image,
                memory: 512,
                portMappings: [ ?? ],
            },
        },
    },
    desiredCount: 1,
});
w
It is possible. But then you’ll have to go find the IP of the task that is running and use that - and if that task does and is restarted, the IP will change. It’s unfortunate that Fargate does not provide a simple IP endpoint for a Service by default.
✔️ 1