How to use the @aws-cdk/aws-ecs.ContainerImage.fromRegistry function in @aws-cdk/aws-ecs

To help you get started, we’ve selected a few @aws-cdk/aws-ecs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / @aws-cdk / aws-ecs-patterns / lib / fargate / load-balanced-fargate-service-applet.ts View on Github external
domainZone = new HostedZoneProvider(this, { domainName: props.domainZone }).findAndImport(this, 'Zone');
    }
    let certificate;
    if (props.certificate) {
      certificate = Certificate.fromCertificateArn(this, 'Cert', props.certificate);
    }

    // Instantiate Fargate Service with just cluster and image
    new LoadBalancedFargateService(this, "FargateService", {
      cluster,
      cpu: props.cpu,
      containerPort: props.containerPort,
      memoryMiB: props.memoryMiB,
      publicLoadBalancer: props.publicLoadBalancer,
      publicTasks: props.publicTasks,
      image: ContainerImage.fromRegistry(props.image),
      desiredCount: props.desiredCount,
      environment: props.environment,
      certificate,
      domainName: props.domainName,
      domainZone
    });
  }
}