sparse-intern-71089
08/16/2022, 1:17 PMfreezing-accountant-92268
08/16/2022, 1:18 PMconst alb = new awsx.lb.ApplicationLoadBalancer("load-balancer");
alb.createListener("http-listener", {
port: 80,
protocol: "HTTP",
defaultAction: {
type: "redirect",
redirect: {
protocol: "HTTPS",
port: "443",
statusCode: "HTTP_301",
},
},
});
const target = alb.createTargetGroup("target-group", {
port: 80,
protocol: "HTTP",
healthCheck: {
path: "/healthCheck",
interval: 30,
timeout: 20,
},
});
const httpslistener = target.createListener("https-listener", {
port: 443,
protocol: "HTTPS",
certificateArn: cert.arn,
});
new awsx.ecs.FargateService("server", {
desiredCount: 2,
taskDefinitionArgs: {
containers: {
server: {
image: awsx.ecs.Image.fromPath("server", "./app"),
memory: 512,
portMappings: [target],
},
},
},
});
export default httpslistener;
billowy-army-68599
billowy-army-68599
freezing-accountant-92268
08/16/2022, 2:45 PMbillowy-army-68599
freezing-accountant-92268
08/16/2022, 2:48 PMbillowy-army-68599
wonderful-tailor-2861
08/16/2022, 5:36 PMbillowy-army-68599
wonderful-tailor-2861
08/16/2022, 5:37 PMwonderful-tailor-2861
08/16/2022, 5:38 PMwonderful-tailor-2861
08/16/2022, 5:39 PMcontainerPort
and targetGroup
but the typescript sdk complains if you actually try passing that inwonderful-tailor-2861
08/16/2022, 5:40 PMType '{ containerPort: number; targetGroup: any; }' is not assignable to type 'Input<PortMapping> | ContainerPortMappingProvider'.
Object literal may only specify known properties, and 'targetGroup' does not exist in type 'Input<PortMapping> | ContainerPortMappingProvider'.
billowy-army-68599
wonderful-tailor-2861
08/16/2022, 5:42 PMwonderful-tailor-2861
08/16/2022, 5:43 PMwonderful-tailor-2861
08/16/2022, 5:46 PMwonderful-tailor-2861
08/16/2022, 5:49 PMwonderful-tailor-2861
08/16/2022, 5:51 PMbillowy-army-68599
aloof-gigabyte-74853
11/15/2022, 3:09 PMbillowy-army-68599