Bug Report: EventBridge Schedules Console does not set "launchType" for ECS RunTask, breaks Assign Public IP

0

Issue Description: When creating a schedule on the EventBridge Schedules Console that uses ECS RunTask, the schedule fails to include launchType in its requestParameters when it is set. This breaks the ability to set Assign Public IP with the error "Assign public IP is not supported for this launch type."

Likely related to this issue: https://repost.aws/questions/QU7GVF66EhSjuLp04GafMKGQ/event-bridge-scheduler-fails-on-ecs-run-task-with-fargate-launch-type

Steps to Reproduce:

  1. Create a new schedule in the EventBridge Schedules console.
  2. Choose ECS RunTask as the Target.
  3. Under the RunTask config section, set Compute Options > Launch type to FARGATE
  4. Set Configure Network Configuration > Auto-assign Public IP to ENABLED

RunTask will fail with logs in CloudTrail similar to the following:

"errorCode": "InvalidParameterException",
    "errorMessage": "Assign public IP is not supported for this launch type.",
    "requestParameters": {
        "cluster": "arn:aws:ecs:XXXXX:XXXXX:cluster/XXXX",
        "count": 1,
        "enableECSManagedTags": true,
        "enableExecuteCommand": false,
        "networkConfiguration": {
            "awsvpcConfiguration": {
                "assignPublicIp": "ENABLED",
                "subnets": [
                    "subnet-XXXXX"
                ]
            }
        },
        "overrides": {},
        "placementConstraints": [],
        "placementStrategy": [],
        "platformVersion": "1.4.0",
        "startedBy": "chronos-schedule/XXXXX",
        "tags": [],
        "taskDefinition": "arn:aws:ecs:XXXXX:XXXXX:task-definition/XXXXX:X"
    },

Notably, launchType is missing from requestParameters even through assignPublicIp was successfully set.

Workaround: I was able to finish my desired test by manually creating a schedule using the AWS CLI. Then, I had no further issue implementing the request in the actual Lambda function being developed. However, this issue was an obstacle to testing and debugging.

  • I was able to create the schedule and run the task. Checking the Ctrail, I can see that it has the launchType filled with "Fargate".

    Could you please run the below command output?

    $ aws scheduler get-schedule --name SCHEDULE_NAME

  • Sorry for the really delayed response, I just saw this. Yep, it looks like it works now, as I see "LaunchType": "FARGATE" in the Target section when I repeat the steps to reproduce and then run that command.

Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas