Goal: understand the interaction between the two levels of Cpu & Memory configuration for each Fargate task, then set the one we need -OR- ensure that we have master-level parameters to pass into the CF templates that control each in turn. (Get rid of the apparent conflict if any between 512/1024 and 256/512 configuration)
One of the more puzzling aspects of the Fargate services as I'm experimenting with getting them running is why there are Cpu + TaskCpu and Memory + TaskMemory definitions in the Fargate service template.
I made an initial attempt to consolidate these parameters - thinking that this was merely an artifact of using multiple sources for Fargate template examples, I commented out the TaskDefinition > Properties > Cpu/Memory parameters and left in the TaskDefinition > Properties > ContainerDefinitions > Cpu/Memory parameters.
That deployment failed with the following error:
Fargate requires that 'cpu' be defined at the task level. (Service: AmazonECS; Status Code: 400; Error Code: ClientException; Request ID: e58daca0-9323-49f2-87bb-c8c1db38ae17)
So I'm going to park this optimization for later, since it's already clear that the 256/512 configuration at the ContainerDefinitions level is what gets assigned to each container task anyway, and we at least have a basic ability to scale these as we learn more about them.
Goal: understand the interaction between the two levels of Cpu & Memory configuration for each Fargate task, then set the one we need -OR- ensure that we have master-level parameters to pass into the CF templates that control each in turn. (Get rid of the apparent conflict if any between 512/1024 and 256/512 configuration)
One of the more puzzling aspects of the Fargate services as I'm experimenting with getting them running is why there are Cpu + TaskCpu and Memory + TaskMemory definitions in the Fargate service template.
I made an initial attempt to consolidate these parameters - thinking that this was merely an artifact of using multiple sources for Fargate template examples, I commented out the TaskDefinition > Properties > Cpu/Memory parameters and left in the TaskDefinition > Properties > ContainerDefinitions > Cpu/Memory parameters.
That deployment failed with the following error:
So I'm going to park this optimization for later, since it's already clear that the 256/512 configuration at the ContainerDefinitions level is what gets assigned to each container task anyway, and we at least have a basic ability to scale these as we learn more about them.
Additionally, we should address Michael's comment here: https://github.com/hackoregon/hackoregon-aws-infrastructure/pull/69/files#r298851914