Here is an updated AWS ECS Fargate walkthrough: <h...
# show-us-what-you-got
a
Here is an updated AWS ECS Fargate walkthrough: https://towardsdatascience.com/how-to-cut-your-aws-ecs-costs-with-fargate-spot-and-prefect-1a1ba5d2e2df.  It can be useful, if: • you face some issues configuring your Prefect ECS agent (especially permissions), • you want to use spot instances to save costs,  • you want to automate agent deployment for different environments (staging, dev, prod).
🦜 9
👏 11
🎉 11
f
@Anna Geller (old account) this is good stuff!! Thank you for sharing! I’d like to learn more about the ecs setup for the prefect agent: • What are the benefits of using an ECS service? Why not just use an EC2 or another Fargate instance? • Can you run multiple agents per on an ECS service? (We spin up a separate agent per project to have more fine grained control) Pinging @Kevin Kho , maybe you have some thoughts too!
k
Anna may know more but: 1. The ECS Service automatically starts up if it dies so your agent will always be available. You can get the same behavior on EC2 using a tool like
supervisord
, or maybe
tmux
or
pm2
. 2. An ECS service is one process so you would likely need to spin up multiple yep. They will have different task definitions because of the change in labels
upvote 1
👌 1
a
@Fina Silva-Santisteban as Kevin said: #1 ECS Service gives you a service that is always up. #2 You can have multiple agents with multiple labels, but they will need to run as different processes. In theory, an ECS service can have multiple containers, so you could have several container agents within a single ECS service, but I didn't try that. The simplest and easiest to manage configuration is to do, as Kevin said, one task definition and ECS service per agent.
👌 1
f
@Kevin Kho @Anna Geller (old account) Thank you both for the info! I think I just didn’t fully understand what the an ECS service does but this is very helpful! 🙏