ablog

不器用で落着きのない技術者のメモ

Step Functions から Fargate タスクを実行する

f:id:yohei-a:20210613183842p:plain

{
  "Comment": "An example of the Amazon States Language for notification on an AWS Fargate task completion",
  "StartAt": "Run Fargate Task",
  "TimeoutSeconds": 3600,
  "States": {
    "Run Fargate Task": {
      "Type": "Task",
      "Resource": "arn:aws:states:::ecs:runTask.sync",
      "Parameters": {
        "LaunchType": "FARGATE",
        "Cluster": "arn:aws:ecs:ap-northeast-1:123456789012:cluster/fargate-batch-task",
        "TaskDefinition": "arn:aws:ecs:ap-northeast-1:123456789012:task-definition/php-sample-fargate:12",
        "NetworkConfiguration": {
          "AwsvpcConfiguration": {
            "Subnets": [
              "subnet-02a4f85a",
              "subnet-f2051c84"
            ],
            "AssignPublicIp": "ENABLED"
          }
        }
      },
      "End": true
    }
  }
}