I have an ECS Fargate task with a few containers that depend on each other sequentially (so container A runs first when the task starts, then container B starts once A succeeds, and so on). Some containers need large CPU/memory while some only need small ones. To make sure all of them have sufficient resources, I set the CPU/memory for the task as the maximum resources needed across all containers.
My question is, does AWS charge me based on the resources allocated to each container, or on the resources requested by the task? The latter would be much more expensive because all container run time will be charged by the maximum rate.