Bump moto-ext to 4.2.7.post1
diff --git a/localstack/services/ec2/provider.py b/localstack/services/ec2/provider.py
index 21db8ab2acde2..7448d8e4ab750 100644
--- a/localstack/services/ec2/provider.py
+++ b/localstack/services/ec2/provider.py
@@ -15,7 +15,6 @@
 )
 from moto.ec2.models.launch_templates import LaunchTemplate as MotoLaunchTemplate
 from moto.ec2.models.subnets import Subnet
-from moto.ec2.models.vpcs import VPCEndPoint
 
 from localstack.aws.api import RequestContext, handler
 from localstack.aws.api.ec2 import (
@@ -496,8 +495,3 @@ def delete_transit_gateway_vpc_attachment(fn, self, transit_gateway_attachment_i
     transit_gateway_attachment = self.transit_gateway_attachments.get(transit_gateway_attachment_id)
     transit_gateway_attachment.state = "deleted"
     return transit_gateway_attachment
-
-
-# fix a bug in upstream moto where a space is encoded in the "Statement" key - TODO remove once fixed upstream
-if "Statement " in VPCEndPoint.DEFAULT_POLICY:
-    VPCEndPoint.DEFAULT_POLICY["Statement"] = VPCEndPoint.DEFAULT_POLICY.pop("Statement ")
diff --git a/localstack/services/sns/provider.py b/localstack/services/sns/provider.py
index 0191c6ef3269d..e155cc2332034 100644
--- a/localstack/services/sns/provider.py
+++ b/localstack/services/sns/provider.py
@@ -342,21 +342,7 @@ def create_platform_endpoint(
     ) -> CreateEndpointResponse:
         # TODO: support mobile app events
         # see https://docs.aws.amazon.com/sns/latest/dg/application-event-notifications.html
-        try:
-            result: CreateEndpointResponse = call_moto(context)
-        except CommonServiceException as e:
-            if "DuplicateEndpoint" in e.code:
-                moto_sns_backend = self.get_moto_backend(context.account_id, context.region)
-                for e in moto_sns_backend.platform_endpoints.values():
-                    if e.token == token:
-                        if custom_user_data and custom_user_data != e.custom_user_data:
-                            raise InvalidParameterException(
-                                f"Endpoint {e.arn} already exists with the same Token, but different attributes."
-                            )
-                        else:
-                            return CreateEndpointResponse(EndpointArn=e.arn)
-            raise
-        return result
+        return call_moto(context)
 
     def unsubscribe(self, context: RequestContext, subscription_arn: subscriptionARN) -> None:
         count = len(subscription_arn.split(":"))
diff --git a/setup.cfg b/setup.cfg
index e5d0842c247e7..a8aa02ba0bf79 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -80,7 +80,7 @@ runtime =
     # to be removed when https://github.com/python-openapi/openapi-schema-validator/issues/131 is resolved
     jsonschema<=4.19.0
     localstack-client>=2.0
-    moto-ext[all]==4.2.6.post2
+    moto-ext[all]==4.2.7.post1
     opensearch-py>=2.3.2
     pymongo>=4.2.0
     pyopenssl>=23.0.0
diff --git a/tests/aws/services/sns/test_sns.py b/tests/aws/services/sns/test_sns.py
index 13ae7c3ef8cf6..553d04351ae80 100644
--- a/tests/aws/services/sns/test_sns.py
+++ b/tests/aws/services/sns/test_sns.py
@@ -3303,8 +3303,10 @@ def check_message():
         retry(check_message, retries=PUBLICATION_RETRIES, sleep=PUBLICATION_TIMEOUT)
 
     @markers.aws.needs_fixing
+    @pytest.mark.skip(reason="Test asserts wrong behaviour")
     # AWS validating this is hard because we need real credentials for a GCM/Apple mobile app
-    # Error responses are from reported https://github.com/spulec/moto/issues/2333
+    # TODO: AWS validate this test
+    # See https://github.com/getmoto/moto/pull/6953 where Moto updated errors.
     def test_create_platform_endpoint_check_idempotency(
         self, sns_create_platform_application, aws_client
     ):
@@ -3314,6 +3316,10 @@ def test_create_platform_endpoint_check_idempotency(
             Attributes={"PlatformCredential": "123"},
         )
         token = "test1"
+        # TODO: As per AWS docs:
+        # > The CreatePlatformEndpoint action is idempotent, so if the requester already owns an endpoint
+        # > with the same device token and attributes, that endpoint's ARN is returned without creating a new endpoint.
+        # The 'Token' and 'Attributes' are critical to idempotent behaviour.
         kwargs_list = [
             {"Token": token, "CustomUserData": "test-data"},
             {"Token": token, "CustomUserData": "test-data"},

This is the final moto-ext bump ahead of LocalStack v3.0.0 release.

Brings in:
- https://github.com/getmoto/moto/pull/7003
- https://github.com/getmoto/moto/pull/7004