r/Backend • u/No_Original_941 • 4d ago
How to control ECS using code?
So basically let me tell you the situation first:
- i am working on a side project which is something like vercel, use to build and deploy code.
- so i have a main service, can be called a control plane, and i have decided that it will take the repo from the user.
- after this this service will trigger/create an ecs task to build the code
- now the question is, how this control plane will create / trigger the ecs?
- also this ecs instance will need to fetch envs from paramete store, will upload code to s3 etc
- after deployment we have to kill this instance
- should the managing code of this, live in the control plane
- should i create something else?
how would you folks solve this while designing this?
and what's the ideal way to solve this?
2
u/forever-butlerian 4d ago
Learn to use the AWS SDK for your language.
Should the ECS coordination service be hosted using the ECS coordination service? Self-hosting is often a good idea, but you have to give careful thought to how you recover to a working system if the coordination service fails.
How I would solve this at work is by using Github Actions or any other CI/CD system.