https://pulumi.com logo
#general
Title
# general
a

able-zoo-58396

03/12/2019, 9:30 PM
Can anyone here help me with a container issue? I'm trying to setup my container with Pulumi in a way that allows me to SSH into the container once it's launched. I have set
cloud-aws:ecsAutoClusterPublicKey
to the value from my
~/.ssh/id_rsa.pub
file And then my container deploys like this:
Copy code
new cloud.Service("container", {
  containers: {
    api: {
      build: ".",
      memory: 1638,
      cpu: 716, 
      ports: [{
        port: 443,
        targetPort: 3333,
        protocol: 'https'
      }]
    },
  }
});
This successfully launched my container, and the web interface is running correctly, but when I try to SSH into the instance, I get
ssh: connect to XXXXX port 22: Connection refused
w

white-balloon-205

03/12/2019, 10:58 PM
It does not appear that you are exposing SSH access per the code sample above. And ECS has limitations to only allowing one load-balanced port per Service so I expect it may not be simple to extend this to support that unfortunately. Does your container expose an ssh daemon? That is also not especially common.
a

able-zoo-58396

03/12/2019, 11:10 PM
Hi @white-balloon-205. Thanks for the reply. I have eventually come to the conclusion that this is a Fargate/ECS limitation more than anything, so I'm going to need to rethink how we run our one-off commands (db migrations, etc). Thanks