launchflow.aws.ecs_fargate
ECSFargate
1class ECSFargate(Service)
A service hosted on AWS ECS Fargate.
Example usage:
1import launchflow as lf
2
3service = lf.aws.ECSFargate("my-service")
NOTE: This will create the following infrastructure in your AWS account:
- A ECS Fargate service with the specified configuration.
- An Application Load Balancer to route traffic to the service.
- A Code Build project that builds and deploys Docker images for the service.
- An Elastic Container Registry repository to store the service's Docker image.
__init__
1def __init__(name: str,
2 dockerfile: str = "Dockerfile",
3 build_directory: str = ".",
4 build_ignore: List[str] = []) -> None
Creates a new ECS Fargate service.
Args:
name
: The name of the service.build_directory
: The directory to build the service from. This should be a relative path from the project root where yourlaunchflow.yaml
is defined.dockerfile
: The Dockerfile to use for building the service. This should be a relative path from thebuild_directory
.build_ignore
: A list of files to ignore when building the service. This can be in the same syntax you would use for a.gitignore
.