https://pulumi.com logo
#aws
Title
# aws
r

refined-vegetable-66224

02/10/2020, 3:24 PM
Ah I see, thank you. And when I define my service, do I reference both listeners in the portMappings? i.e. `const httpPort = alb.createListener(
web-${envName}
, {`
port: 80,
external: true,
protocol: "HTTP",
defaultAction: {
type: "redirect",
redirect: {
protocol: "HTTPS",
port: "443",
statusCode: "HTTP_301",
},
},
});
Copy code
const httpsPort = alb.createListener("blah", { 
  port: 443, 
  protocol: "HTTPS", 
  external: true, 
  defaultAction: { 
    type: "forward", 
    targetGroupArn: "your target group arn here" 
  }, 
  certificateArn: "your certificate arn here"
});
`const appService = new awsx.ecs.FargateService(
express-svc-${envName}
, {`
cluster,
taskDefinitionArgs: {
container: {
image: img,
cpu: 102 /*10% of 1024*/,
memory: 1000 /*MB*/,
portMappings: [ httpPort, httpsPort ],
},
},
desiredCount: 5,
});
3 Views