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
self.log.info(
            'Running ECS Task - Task definition: %s - on cluster %s', self.task_definition, self.cluster
        )
        self.log.info('ECSOperator overrides: %s', self.overrides)
        self.client = self.get_hook().get_conn()
        if self.reattach:
            self._try_reattach_task(context)
        if not self.arn:
            self._start_task(context)
        self._wait_for_task_ended()
        self._check_success_task()
        self.log.info('ECS Task has been successfully executed')
        if self.reattach:
            
            
            self._xcom_del(session, self.REATTACH_XCOM_TASK_ID_TEMPLATE.format(task_id=self.task_id))
        if self.do_xcom_push:
            return self._last_log_message()
        return None
    def _xcom_del(self, session, task_id):