freezing-accountant-92268
08/16/2022, 1:17 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
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 PMcontainerPort
and targetGroup
but the typescript sdk complains if you actually try passing that inType '{ 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 PMbillowy-army-68599
aloof-gigabyte-74853
11/15/2022, 3:09 PMbillowy-army-68599