Ranisterio
Ranisterio

Reputation: 107

Run multiple fargate task with step function

I would like to run 5 instances of my fargate task with step function.

...
    "Fargate_task": {
      "Type": "Task",
      "Resource": "arn:aws:states:::ecs:runTask.sync",
      "Parameters": {
        "LaunchType": "FARGATE",
        "Count":5,
        "Cluster": "my_cluster",
        "TaskDefinition": "my_task_definition",
        "NetworkConfiguration": {
          "AwsvpcConfiguration": {
            "Subnets": [
              "subnet-1",
              "subnet-2"
            ],
            "AssignPublicIp": "ENABLED"
          }
        }
      },
      "Next": "Next_task"
    },
...

This is the Json I provided, but I can't save it because "The field 'Count' is not supported by Step Functions".

Do you have any idea of how to do ?

I followed the doc here where the key 'count' is written ...

Thank you for helping

Upvotes: 5

Views: 2107

Answers (1)

shariqmaws
shariqmaws

Reputation: 8890

Unfortunately, 'Count' is not a supported parameter: [1]

Supported parameters:

  • Cluster
  • Group
  • LaunchType
  • NetworkConfiguration
  • Overrides
  • PlacementConstraints
  • PlacementStrategy
  • PlatformVersion
  • TaskDefinition

[1] Manage Amazon ECS or Fargate Tasks with Step Functions - https://docs.aws.amazon.com/step-functions/latest/dg/connect-ecs.html

Upvotes: 0

Related Questions