Docker compose ECS: unable to create more than 1 fargate container

My docker-compose file is shown below.

I am trying to create two fargate container services in ECS behind an ALB, but the when it starts creating cancer-api2 service will stall, and the whole stack will get deleted because of timeout.

Does anybody knows the reason why?

version: "3.2"

x-aws-vpc: <vpc-id>

services:
    cancer-api:
        container_name: cancer-api
        image: <image-url1>
        ports:
            - target: 5000
              x-aws-protocol: http 
    cancer-api2:
        container_name: cancer-api2
        image: <image-url2>
        ports:
            - target: 5001
              x-aws-protocol: http