@zarpay/zar-cdk-lib - v0.32.0
    Preparing search index...

    Class EcsFargateService

    Golden Path ECS Fargate Service for ZAR applications.

    Wraps EcsFargateTaskDefinition and adds:

    • ECS cluster management
    • Auto-scaling on CPU/Memory
    • Circuit breaker with rollback
    • ECS Exec support
    • Optional Blue/Green deployment
    const service = new EcsFargateService(this, 'WebService', {
    appName: 'ZarCore',
    deployEnvironment: 'staging',
    image: ecs.ContainerImage.fromEcrRepository(repo, 'v1.0.0'),
    imageVersion: 'v1.0.0',
    desiredCount: 3,
    autoScaling: {
    minCapacity: 2,
    maxCapacity: 10,
    },
    });

    Hierarchy

    • Construct
      • EcsFargateService

    Implements

    Index

    Constructors

    Properties

    cluster: ICluster

    The ECS cluster

    container: ContainerDefinition

    The main container definition

    scalableTarget?: ScalableTaskCount

    The auto-scaling target (if auto-scaling is enabled)

    securityGroup: SecurityGroup

    The security group for ECS tasks

    service: FargateService

    The Fargate service

    taskDefinition: FargateTaskDefinition

    The Fargate task definition

    vpc: IVpc

    The VPC where resources are deployed