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
run_opts['platformVersion'] = self.platform_version
        if self.group is not None:
            run_opts['group'] = self.group
        if self.placement_constraints is not None:
            run_opts['placementConstraints'] = self.placement_constraints
        if self.placement_strategy is not None:
            run_opts['placementStrategy'] = self.placement_strategy
        if self.network_configuration is not None:
            run_opts['networkConfiguration'] = self.network_configuration
        if self.tags is not None:
            run_opts['tags'] = [{'key': k, 'value': v} for (k, v) in self.tags.items()]
        if self.propagate_tags is not None:
            run_opts['propagateTags'] = self.propagate_tags
        response = self.client.run_task(**run_opts)
        failures = response['failures']
        if len(failures) > 0:
            raise ECSOperatorError(failures, response)
        self.log.info('ECS Task started: %s', response)
        self.arn = response['tasks'][0]['taskArn']
        ecs_task_id = self.arn.split("/")[-1]
        self.log.info(f"ECS task ID is: {ecs_task_id}")
        if self.reattach:
            
            self._xcom_set(
                context,
                key=self.REATTACH_XCOM_KEY,
                value=self.arn,
                task_id=self.REATTACH_XCOM_TASK_ID_TEMPLATE.format(task_id=self.task_id),
            )
    def _xcom_set(self, context, key, value, task_id):