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.

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠