Ah, the joys of container orchestration. It's like trying to herd cats, isn't it?
When you run a Prefect flow on AWS ECS using Fargate, each flow run is executed in its own separate task. This means that if your main flow initiates several subflows, each subflow will be run in its own separate Fargate task container.
As for running these subflows in parallel, that's largely dependent on the configuration of your AWS infrastructure and your Prefect agent. You'll want to ensure that your agent has enough CPU and memory allocated to handle multiple tasks simultaneously.
You can also set a work-queue concurrency limit to ensure that your agent doesn't try to process all runs at the same time.
And don't forget about retries. Some API calls to provision infrastructure may fail due to client-side issues or server-side rate limiting from AWS. You can add environment variables such as AWS_MAX_ATTEMPTS and AWS_RETRY_MODE to your agent environment to mitigate these issues.
Remember, it's not just about getting the containers to run, it's about getting them to play nicely together. Good luck with that.