How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • taskDefinition.addExtension(new MyExtension("some_parameter"));
    
    Docs
    0
  • const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
      isDefault: true,
    });
    
    const cluster = new ecs.Cluster(this, 'FargateCluster', { vpc });
    
    const taskDefinition = new ecs.TaskDefinition(this, 'TD', {
      memoryMiB: '512',
      cpu: '256',
      compatibility: ecs.Compatibility.FARGATE,
    });
    
    const containerDefinition = taskDefinition.addContainer('TheContainer', {
      image: ecs.ContainerImage.fromRegistry('foo/bar'),
      memoryLimitMiB: 256,
    });
    
    const runTask = new tasks.EcsRunTask(this, 'RunFargate', {
      integrationPattern: sfn.IntegrationPattern.RUN_JOB,
      cluster,
      taskDefinition,
      assignPublicIp: true,
      containerOverrides: [{
        containerDefinition,
        environment: [{ name: 'SOME_KEY', value: sfn.JsonPath.stringAt('$.SomeKey') }],
      }],
      launchTarget: new tasks.EcsFargateLaunchTarget(),
    });
    
    Docs
    0
  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as ec2 from '@aws-cdk/aws-ec2';
    import * as ecs from '@aws-cdk/aws-ecs';
    import * as stepfunctions from '@aws-cdk/aws-stepfunctions';
    import * as stepfunctions_tasks from '@aws-cdk/aws-stepfunctions-tasks';
    
    declare const cluster: ecs.Cluster;
    declare const containerDefinition: ecs.ContainerDefinition;
    declare const securityGroup: ec2.SecurityGroup;
    declare const subnet: ec2.Subnet;
    declare const subnetFilter: ec2.SubnetFilter;
    declare const taskDefinition: ecs.TaskDefinition;
    
    const runEcsFargateTask = new stepfunctions_tasks.RunEcsFargateTask({
      cluster: cluster,
      taskDefinition: taskDefinition,
    
      // the properties below are optional
      assignPublicIp: false,
      containerOverrides: [{
        containerDefinition: containerDefinition,
    
        // the properties below are optional
        command: ['command'],
        cpu: 123,
        environment: [{
          name: 'name',
          value: 'value',
        }],
        memoryLimit: 123,
        memoryReservation: 123,
      }],
      integrationPattern: stepfunctions.ServiceIntegrationPattern.FIRE_AND_FORGET,
      platformVersion: ecs.FargatePlatformVersion.LATEST,
      securityGroup: securityGroup,
      subnets: {
        availabilityZones: ['availabilityZones'],
        onePerAz: false,
        subnetFilters: [subnetFilter],
        subnetGroupName: 'subnetGroupName',
        subnetName: 'subnetName',
        subnets: [subnet],
        subnetType: ec2.SubnetType.ISOLATED,
      },
    });
    
    Docs
    0
  • const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
      isDefault: true,
    });
    
    const cluster = new ecs.Cluster(this, 'FargateCluster', { vpc });
    
    const taskDefinition = new ecs.TaskDefinition(this, 'TD', {
      memoryMiB: '512',
      cpu: '256',
      compatibility: ecs.Compatibility.FARGATE,
    });
    
    const containerDefinition = taskDefinition.addContainer('TheContainer', {
      image: ecs.ContainerImage.fromRegistry('foo/bar'),
      memoryLimitMiB: 256,
    });
    
    const runTask = new tasks.EcsRunTask(this, 'RunFargate', {
      integrationPattern: sfn.IntegrationPattern.RUN_JOB,
      cluster,
      taskDefinition,
      assignPublicIp: true,
      containerOverrides: [{
        containerDefinition,
        environment: [{ name: 'SOME_KEY', value: sfn.JsonPath.stringAt('$.SomeKey') }],
      }],
      launchTarget: new tasks.EcsFargateLaunchTarget(),
    });
    
    Docs
    0
  • const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
      isDefault: true,
    });
    
    const cluster = new ecs.Cluster(this, 'Ec2Cluster', { vpc });
    cluster.addCapacity('DefaultAutoScalingGroup', {
      instanceType: new ec2.InstanceType('t2.micro'),
      vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
    });
    
    const taskDefinition = new ecs.TaskDefinition(this, 'TD', {
      compatibility: ecs.Compatibility.EC2,
    });
    
    taskDefinition.addContainer('TheContainer', {
      image: ecs.ContainerImage.fromRegistry('foo/bar'),
      memoryLimitMiB: 256,
    });
    
    const runTask = new tasks.EcsRunTask(this, 'Run', {
      integrationPattern: sfn.IntegrationPattern.RUN_JOB,
      cluster,
      taskDefinition,
      launchTarget: new tasks.EcsEc2LaunchTarget({
        placementStrategies: [
          ecs.PlacementStrategy.spreadAcrossInstances(),
          ecs.PlacementStrategy.packedByCpu(),
          ecs.PlacementStrategy.randomly(),
        ],
        placementConstraints: [
          ecs.PlacementConstraint.memberOf('blieptuut'),
        ],
      }),
    });
    
    Docs
    0
  • const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
      isDefault: true,
    });
    
    const cluster = new ecs.Cluster(this, 'Ec2Cluster', { vpc });
    cluster.addCapacity('DefaultAutoScalingGroup', {
      instanceType: new ec2.InstanceType('t2.micro'),
      vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
    });
    
    const taskDefinition = new ecs.TaskDefinition(this, 'TD', {
      compatibility: ecs.Compatibility.EC2,
    });
    
    taskDefinition.addContainer('TheContainer', {
      image: ecs.ContainerImage.fromRegistry('foo/bar'),
      memoryLimitMiB: 256,
    });
    
    const runTask = new tasks.EcsRunTask(this, 'Run', {
      integrationPattern: sfn.IntegrationPattern.RUN_JOB,
      cluster,
      taskDefinition,
      launchTarget: new tasks.EcsEc2LaunchTarget({
        placementStrategies: [
          ecs.PlacementStrategy.spreadAcrossInstances(),
          ecs.PlacementStrategy.packedByCpu(),
          ecs.PlacementStrategy.randomly(),
        ],
        placementConstraints: [
          ecs.PlacementConstraint.memberOf('blieptuut'),
        ],
      }),
    });
    
    Docs
    0
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples