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.
tests/providers/amazon/aws/operators/test_ecs.py
extend_args['launchType'] = launch_type
        if launch_type == 'FARGATE':
            extend_args['platformVersion'] = 'LATEST'
        if tags:
            extend_args['tags'] = [{'key': k, 'value': v} for (k, v) in tags.items()]
        reattach_mock.assert_called_once()
        client_mock.run_task.assert_called_once()
        xcom_set_mock.assert_called_once_with(
            self.mock_context,
            key=self.ecs.REATTACH_XCOM_KEY,
            task_id=self.ecs.REATTACH_XCOM_TASK_ID_TEMPLATE.format(task_id=self.ecs.task_id),
            value="arn:aws:ecs:us-east-1:012345678910:task/d8c67b3c-ac87-4ffe-a847-4785bc3a8b55",
        )
        wait_mock.assert_called_once_with()
        check_mock.assert_called_once_with()
        xcom_del_mock.assert_called_once()
        assert self.ecs.arn == 'arn:aws:ecs:us-east-1:012345678910:task/d8c67b3c-ac87-4ffe-a847-4785bc3a8b55'
    @mock.patch.object(ECSOperator, '_last_log_message', return_value="Log output")
    def test_execute_xcom_with_log(self, mock_cloudwatch_log_message):
        self.ecs.do_xcom_push = True
        assert self.ecs.execute(None) == mock_cloudwatch_log_message.return_value
    @mock.patch.object(ECSOperator, '_last_log_message', return_value=None)
    def test_execute_xcom_with_no_log(self, mock_cloudwatch_log_message):
        self.ecs.do_xcom_push = True
        assert self.ecs.execute(None) == mock_cloudwatch_log_message.return_value
    @mock.patch.object(ECSOperator, '_last_log_message', return_value="Log output")
    def test_execute_xcom_disabled(self, mock_cloudwatch_log_message):
        self.ecs.do_xcom_push = False
        assert self.ecs.execute(None) is None
class TestShouldRetry(unittest.TestCase):