most-judge-33290
06/14/2019, 4:53 PMconst alb = new awsx.elasticloadbalancingv2.ApplicationLoadBalancer(
"net-lb",
{
external: true,
securityGroups: cluster.securityGroups
}
);
const web = alb.createListener("web", { port: 80, external: true });
// Step 4: Create a Fargate service task that can scale out.
const appService = new awsx.ecs.FargateService("scolasticus_api", {
cluster,
taskDefinitionArgs: {
container: {
image: "scolasticus_api",
cpu: 256 /*10% of 1024*/,
memory: 256 /*MB*/,
portMappings: [web]
}
},
desiredCount: 1
});