Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions localstack-core/localstack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,16 +1128,8 @@ def populate_edge_configuration(
# Whether to really publish to GCM while using SNS Platform Application (needs credentials)
LEGACY_SNS_GCM_PUBLISHING = is_env_true("LEGACY_SNS_GCM_PUBLISHING")

# Whether the Next Gen APIGW invocation logic is enabled (handler chain)
APIGW_NEXT_GEN_PROVIDER = os.environ.get("PROVIDER_OVERRIDE_APIGATEWAY", "") == "next_gen"
if APIGW_NEXT_GEN_PROVIDER:
# in order to not have conflicts with different implementation registering their own router, we need to have all of
# them use the same new implementation
if not os.environ.get("PROVIDER_OVERRIDE_APIGATEWAYV2"):
os.environ["PROVIDER_OVERRIDE_APIGATEWAYV2"] = "next_gen"

if not os.environ.get("PROVIDER_OVERRIDE_APIGATEWAYMANAGEMENTAPI"):
os.environ["PROVIDER_OVERRIDE_APIGATEWAYMANAGEMENTAPI"] = "next_gen"
# Whether the Next Gen APIGW invocation logic is enabled (on by default)
APIGW_NEXT_GEN_PROVIDER = os.environ.get("PROVIDER_OVERRIDE_APIGATEWAY", "") in ("next_gen", "")

# Whether the DynamoDBStreams native provider is enabled
DDB_STREAMS_PROVIDER_V2 = os.environ.get("PROVIDER_OVERRIDE_DYNAMODBSTREAMS", "") == "v2"
Expand All @@ -1151,7 +1143,6 @@ def populate_edge_configuration(
os.environ["PROVIDER_OVERRIDE_DYNAMODBSTREAMS"] = "v2"
DDB_STREAMS_PROVIDER_V2 = True


# TODO remove fallback to LAMBDA_DOCKER_NETWORK with next minor version
MAIN_DOCKER_NETWORK = os.environ.get("MAIN_DOCKER_NETWORK", "") or LAMBDA_DOCKER_NETWORK

Expand Down
15 changes: 12 additions & 3 deletions localstack-core/localstack/services/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ def acm():
return Service.for_provider(provider, dispatch_table_factory=MotoFallbackDispatcher)


@aws_provider(api="apigateway")
@aws_provider()
def apigateway():
from localstack.services.apigateway.legacy.provider import ApigatewayProvider
from localstack.services.apigateway.next_gen.provider import ApigatewayNextGenProvider
from localstack.services.moto import MotoFallbackDispatcher

provider = ApigatewayProvider()
provider = ApigatewayNextGenProvider()
return Service.for_provider(provider, dispatch_table_factory=MotoFallbackDispatcher)


Expand All @@ -32,6 +32,15 @@ def apigateway_next_gen():
return Service.for_provider(provider, dispatch_table_factory=MotoFallbackDispatcher)


@aws_provider(api="apigateway", name="legacy")
def apigateway_legacy():
from localstack.services.apigateway.legacy.provider import ApigatewayProvider
from localstack.services.moto import MotoFallbackDispatcher

provider = ApigatewayProvider()
return Service.for_provider(provider, dispatch_table_factory=MotoFallbackDispatcher)


@aws_provider()
def cloudformation():
from localstack.services.cloudformation.provider import CloudformationProvider
Expand Down