Search code examples
amazon-ecsaws-fargate

Provisioning ALBs for services in ECS with Fargate


I am building an automatic pipeline that's supposed to check out some code from a repository, build a docker container and launch it as a service in ECS, entirely programmatically. I progressed as far as having to provision a load balancer for a service, and here I'm stuck: I couldn't find an API or any documentation on how to create load balancers programmatically.

Am I wanting something that's not supposed to happen? For now the only way I see is to manually configure an ALB for every new service, but this defeats the whole point.


Solution

  • cli, or python, or java...

    There are other SDKs as well. You can also leverage CloudFormation within AWS, or a third party tool like HashiCorp's Terraform.

    All the SDKs I've used simply wrap the CLI tool, which is cool because it means how the SDKs are organized is largely the same regardless of language. If you ever can't find something in the SDK, start by finding it in the CLI.