Skip to content

EcsRunTask not deploy any task #22030

Answered by pahud
Fitmavincent asked this question in Q&A
Sep 14, 2022 · 5 comments · 17 replies
Discussion options

You must be logged in to vote

@Fitmavincent check out my full sample here

import {
  App, Stack, StackProps, Duration,
  aws_ecs as ecs,
  aws_ec2 as ec2,
  aws_stepfunctions as sfn,
  aws_stepfunctions_tasks as tasks,
} from 'aws-cdk-lib';
import { Construct } from 'constructs';


export class Demo extends Construct {
  constructor(scope: Construct, id: string) {
    super(scope, id);
    const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
      isDefault: true,
    });

    const cluster = new ecs.Cluster(this, 'Ec2Cluster', { vpc });

    const taskDefinition = new ecs.FargateTaskDefinition(this, 'TD', {
      cpu: 256,
      memoryLimitMiB: 512,
    });

    taskDefinition.addContainer('TheContainer', {
      image: ecs.C…

Replies: 5 comments 17 replies

Comment options

You must be logged in to vote
1 reply
@Fitmavincent
Comment options

Comment options

You must be logged in to vote
14 replies
@abury
Comment options

@pahud
Comment options

@modosc
Comment options

@pahud
Comment options

@lucasmaia1202
Comment options

Answer selected by Fitmavincent
Comment options

You must be logged in to vote
1 reply
@Fitmavincent
Comment options

Comment options

You must be logged in to vote
1 reply
@kisharma24
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants