Hi I was wondering if there is a way to map a port...
# general
k
Hi I was wondering if there is a way to map a port. I have something like this:``` let service = new cloud.Service("MyService", { containers: { Api: { image: "MY_IMAGE", memory: 256, ports: [{ port: 8081 }], }, }, replicas: 1, });``` I am willing to use the port 80 instead of 8081 which is the port exposed by the container.
c
cc @lemon-spoon-91807
l
Hey Rene, you should be able to provide both 'port' and 'targetPort' to help control this
✔️ 1
Note: our recommendation too is (if you're on AWS) to move to awsx.ecs.FargateService or awsx.ecs.EC2Service
as they are much more flexible and powerful. cheers!
k
awesome, thanks Cyrus. I will move to FargateService, that’s the one I am using right now.