Repository: serverless/dashboard (language: python)

Issue:
fix: Ensure aws-lambda-sdk types match aws-sdk
When we fixed the [types for serverless-sdk](https://github.com/serverless/console/pull/371). We never applied this fix to the `serverless-lambda-sdk`. 
SDK: Revert breaking rename into `sls_sdk`
Revert #590 

Instead of renaming we willintroduce `sls_sdk` alias to `serverless_sdk`


Discussion / hints:

Fix patch:
diff --git a/python/packages/aws-lambda-sdk/CHANGELOG.md b/python/packages/aws-lambda-sdk/CHANGELOG.md
index 8b33c69e7..ea9bff5e0 100644
--- a/python/packages/aws-lambda-sdk/CHANGELOG.md
+++ b/python/packages/aws-lambda-sdk/CHANGELOG.md
@@ -3,7 +3,6 @@
 All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
 
 ## 0.1.11 (2023-03-30)
-### ⚠ BREAKING CHANGES
 
 - Change name of package module from `sls_sdk.` to `sls_sdk`
 
diff --git a/python/packages/aws-lambda-sdk/pyproject.toml b/python/packages/aws-lambda-sdk/pyproject.toml
index a0686e17c..e2408aaaa 100644
--- a/python/packages/aws-lambda-sdk/pyproject.toml
+++ b/python/packages/aws-lambda-sdk/pyproject.toml
@@ -14,7 +14,7 @@ authors = [{ name = "serverlessinc" }]
 requires-python = ">=3.7"
 dependencies = [
     "aiohttp~=3.8",
-    "serverless-sdk~=0.3.8",
+    "serverless-sdk~=0.3.9",
     "serverless-sdk-schema~=0.2.0",
     "strenum~=0.4",
     "typing-extensions~=4.5", # included in Python 3.8 - 3.11
diff --git a/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/__init__.py b/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/__init__.py
index 61c303cfe..f820db146 100644
--- a/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/__init__.py
+++ b/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/__init__.py
@@ -2,10 +2,10 @@
 import os
 import logging
 from typing import Optional
-from sls_sdk import serverlessSdk as baseSdk
+from serverless_sdk import serverlessSdk as baseSdk
 from .trace_spans.aws_lambda import aws_lambda_span
-from sls_sdk import ServerlessSdk, TraceSpans
-from sls_sdk.lib.trace import TraceSpan
+from serverless_sdk import ServerlessSdk, TraceSpans
+from serverless_sdk.lib.trace import TraceSpan
 from .base import NAME, __version__
 
 
diff --git a/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/instrument/__init__.py b/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/instrument/__init__.py
index b06f8d4e5..2697ec39f 100644
--- a/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/instrument/__init__.py
+++ b/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/instrument/__init__.py
@@ -8,15 +8,15 @@
 from typing import List, Optional, Any
 from typing_extensions import Final
 import random
-from sls_sdk.lib.timing import to_protobuf_epoch_timestamp
+from serverless_sdk.lib.timing import to_protobuf_epoch_timestamp
 from .lib.sdk import serverlessSdk
 from .lib.invocation_context import (
     set as set_invocation_context,
     get as get_invocation_context,
 )
 from .lib.payload_conversion import to_trace_payload, to_request_response_payload
-from sls_sdk.lib.trace import TraceSpan
-from sls_sdk.lib.captured_event import CapturedEvent
+from serverless_sdk.lib.trace import TraceSpan
+from serverless_sdk.lib.captured_event import CapturedEvent
 import base64
 
 
diff --git a/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/internal_extension/wrapper.py b/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/internal_extension/wrapper.py
index 8adb87677..144e8de94 100644
--- a/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/internal_extension/wrapper.py
+++ b/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/internal_extension/wrapper.py
@@ -15,7 +15,7 @@
 from ..instrument import Instrumenter
 
 if TYPE_CHECKING:
-    from sls_sdk.sdk.base import ServerlessSdk
+    from serverless_sdk.sdk.base import ServerlessSdk
 
 else:
     ServerlessSdk: TypeAlias = "ServerlessSdk"
diff --git a/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/trace_spans/aws_lambda.py b/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/trace_spans/aws_lambda.py
index 7059ea1ac..97bec848c 100644
--- a/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/trace_spans/aws_lambda.py
+++ b/python/packages/aws-lambda-sdk/serverless_aws_lambda_sdk/trace_spans/aws_lambda.py
@@ -3,7 +3,7 @@
 import platform
 import logging
 
-from sls_sdk.lib.trace import TraceSpan
+from serverless_sdk.lib.trace import TraceSpan
 
 __all__ = [
     "aws_lambda_span",
diff --git a/python/packages/sdk/README.md b/python/packages/sdk/README.md
index ff7fedb7b..46c6c828e 100644
--- a/python/packages/sdk/README.md
+++ b/python/packages/sdk/README.md
@@ -21,7 +21,7 @@ pip install serverless-sdk
 ### Usage
 
 ```python
-from sls_sdk import serverlessSdk
+from serverless_sdk import serverlessSdk
 print(serverlessSdk.name)
 print(serverlessSdk.version)
 


Test patch:
diff --git a/python/packages/aws-lambda-sdk/tests/conftest.py b/python/packages/aws-lambda-sdk/tests/conftest.py
index 9caa63123..6cd240d0b 100644
--- a/python/packages/aws-lambda-sdk/tests/conftest.py
+++ b/python/packages/aws-lambda-sdk/tests/conftest.py
@@ -19,7 +19,7 @@ def _reset_sdk(
     monkeypatch, request, is_dev_mode: bool = False, is_debug_mode: bool = False
 ):
     for key in list(sys.modules.keys()):
-        if key.startswith("serverless_") or key.startswith("sls_"):
+        if key.startswith("serverless_"):
             del sys.modules[key]
 
     monkeypatch.setenv("AWS_LAMBDA_FUNCTION_NAME", TEST_FUNCTION)
diff --git a/python/packages/aws-lambda-sdk/tests/fixtures/lambdas/sdk.py b/python/packages/aws-lambda-sdk/tests/fixtures/lambdas/sdk.py
index f84cc6c5f..afb75563d 100644
--- a/python/packages/aws-lambda-sdk/tests/fixtures/lambdas/sdk.py
+++ b/python/packages/aws-lambda-sdk/tests/fixtures/lambdas/sdk.py
@@ -1,4 +1,4 @@
-from sls_sdk import serverlessSdk as sdk
+from serverless_sdk import serverlessSdk as sdk
 import logging
 
 
diff --git a/python/packages/aws-lambda-sdk/tests/fixtures/lambdas/sdk_sampled_out.py b/python/packages/aws-lambda-sdk/tests/fixtures/lambdas/sdk_sampled_out.py
index a7781b530..69a5104d2 100644
--- a/python/packages/aws-lambda-sdk/tests/fixtures/lambdas/sdk_sampled_out.py
+++ b/python/packages/aws-lambda-sdk/tests/fixtures/lambdas/sdk_sampled_out.py
@@ -7,7 +7,7 @@ def handler(event, context):
     counter += 1
     invocation_id = counter
 
-    from sls_sdk import serverlessSdk as sdk
+    from serverless_sdk import serverlessSdk as sdk
     from serverless_aws_lambda_sdk import serverlessSdk
 
     if sdk is not serverlessSdk:
diff --git a/python/packages/aws-lambda-sdk/tests/instrument/lib/test_dev_mode.py b/python/packages/aws-lambda-sdk/tests/instrument/lib/test_dev_mode.py
index 5e689646e..2ada19cf8 100644
--- a/python/packages/aws-lambda-sdk/tests/instrument/lib/test_dev_mode.py
+++ b/python/packages/aws-lambda-sdk/tests/instrument/lib/test_dev_mode.py
@@ -1,6 +1,6 @@
 from unittest.mock import MagicMock, call
-from sls_sdk.lib.captured_event import CapturedEvent
-from sls_sdk.lib.trace import TraceSpan
+from serverless_sdk.lib.captured_event import CapturedEvent
+from serverless_sdk.lib.trace import TraceSpan
 from serverless_sdk_schema import TracePayload
 import asyncio
 import time