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
return self.awslogs_group and self.awslogs_stream_prefix
    def _last_log_message(self):
        try:
            return deque(self._cloudwatch_log_events(), maxlen=1).pop()["message"]
        except IndexError:
            return None
    def _check_success_task(self) -> None:
        if not self.client or not self.arn:
            return
        response = self.client.describe_tasks(cluster=self.cluster, tasks=[self.arn])
        self.log.info('ECS Task stopped, check status: %s', response)
        
        for event in self._cloudwatch_log_events():
            event_dt = datetime.fromtimestamp(event['timestamp'] / 1000.0)
            self.log.info("[%s] %s", event_dt.isoformat(), event['message'])
        if len(response.get('failures', [])) > 0:
            raise AirflowException(response)
        for task in response['tasks']:
            
            
            
            
            if re.match(r'Host EC2 \(instance .+?\) (stopped|terminated)\.', task.get('stoppedReason', '')):
                raise AirflowException(
                    'The task was stopped because the host instance terminated: {}'.format(
                        task.get('stoppedReason', '')
                    )