This message was deleted.
# aws
s
This message was deleted.
l
You want to install Docker / podman / something else, then run an image on an EC2 instance? You'll need to connect to the instance somehow. You could use ansible, ssh, or similar. If you just want to "hide" user_data, you could use CloudInit, which is a wrapper around user_data: https://www.pulumi.com/registry/packages/cloudinit/
🙌 1
There's also Pulumi Command, which is kind of a supercharged ssh: https://www.pulumi.com/registry/packages/command/
❤️ 1
Have you considered ECS instead of EC2? That will look after most of the configuration for you.
c
Yes, I was considering ECS, but I thought that it would be more costly to use it. I was thinking to use aws.ecs.EC2Service and define containers there, but any ideas on how much more than just using an EC2 instance would it cost?
And thanks a lot for your answer!! Appreciate it.
l
I don't know how to measure how much it'll cost to write and maintain the equivalent EC2 code 🙂 The ECS service costs more because it's a managed service, so you're paying AWS to look after the nitty-gritty for you. And ECS can be cheaper than EC2, if your container runs only rarely. AWS provides calculators for a lot of their costs, but I don't know if there's one for ECS.
You might consider doing it in ECS and allocating a Budget; that way, AWS will inform you if ECS gets too expensive, and you can put the effort into an EC2 solution then?
And Budgets are a good idea in general; once you've seen the benefit of one, you might start creating more and more, and getting better and better cost analysis from AWS.
1
c
That sounds reasonable. Thanks you for the recommendations, will definitely consider this option 🙌
g
Another option is to look at AWS App Runner