Currently `ECSOperator` propagates `platform_version` parameter either in case `launch_type` is `FARGATE` or there is `capacity_provider_strategy` parameter provided. The case with `capacity_provider_strategy` is wrong. Capacity provider strategy can contain a reference on EC2 capacity provider. If it's an EC2 capacity provider, then `platform_version` should not be propagated to the `boto3` api call. And it's not possible to do so with the current logic of `ECSOperator` because `platform_version` is always propagated in such case and `boto3` doesn't accept `platform_version` as `None`. So in order to fix that `platform_version` should be an independent parameter and propagated only when it's specified, regardless which `launch_type` or `capacity_provider_strategy` is specified. That should also simplify the logic of `ECSOperator`.

I will prepare a PR to fix that.
airflow/providers/amazon/aws/operators/ecs.py
XCom.set(
            key=key,
            value=value,
            task_id=task_id,
            dag_id=self.dag_id,
            execution_date=context["ti"].execution_date,
        )
    def _try_reattach_task(self, context):
        task_def_resp = self.client.describe_task_definition(taskDefinition=self.task_definition)
        ecs_task_family = task_def_resp['taskDefinition']['family']
        list_tasks_resp = self.client.list_tasks(
            cluster=self.cluster, desiredStatus='RUNNING', family=ecs_task_family
        )
        running_tasks = list_tasks_resp['taskArns']
        
        previous_task_arn = self.xcom_pull(
            context,
            task_ids=self.REATTACH_XCOM_TASK_ID_TEMPLATE.format(task_id=self.task_id),
            key=self.REATTACH_XCOM_KEY,
        )
        if previous_task_arn in running_tasks:
            self.arn = previous_task_arn
            self.log.info("Reattaching previously launched task: %s", self.arn)
        else:
            self.log.info("No active previously launched task found to reattach")
    def _wait_for_task_ended(self) -> None: