diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 419e369867..2da15e17b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ Contributions via pull requests are much appreciated. Before sending us a pull r 1. You are working against the latest source on the *develop* branch. 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. 3. You open an issue to discuss any significant work - we would hate for your time to be wasted. -4. The change works in both Python2.7 and Python3.6 (support Python Versions) +4. The change works in Python3 (see supported Python Versions in setup.py) 5. Does the PR have updated/added unit, functional, and integration tests? 6. PR is merged submitted to merge into develop. diff --git a/samcli/commands/build/command.py b/samcli/commands/build/command.py index 83873cebbf..ee87cc6ba0 100644 --- a/samcli/commands/build/command.py +++ b/samcli/commands/build/command.py @@ -40,11 +40,11 @@ \b Supported Runtimes ------------------ -1. Python 2.7, 3.6, 3.7, 3.8 3.9 using PIP\n -2. Nodejs 14.x, 12.x, 10.x, 8.10, 6.10 using NPM\n -3. Ruby 2.5 using Bundler\n +1. Python 3.6, 3.7, 3.8 3.9 using PIP\n +2. Nodejs 14.x, 12.x using NPM\n +3. Ruby 2.7 using Bundler\n 4. Java 8, Java 11 using Gradle and Maven\n -5. Dotnetcore2.0 and 2.1 using Dotnet CLI (without --use-container flag)\n +5. Dotnetcore3.1 using Dotnet CLI (without --use-container flag)\n 6. Go 1.x using Go Modules (without --use-container flag)\n \b Examples diff --git a/samcli/commands/init/__init__.py b/samcli/commands/init/__init__.py index 92f1ca33de..a345e3c30e 100644 --- a/samcli/commands/init/__init__.py +++ b/samcli/commands/init/__init__.py @@ -15,6 +15,7 @@ from samcli.lib.telemetry.metric import track_command from samcli.commands.init.interactive_init_flow import _get_runtime_from_image, get_architectures, get_sorted_runtimes from samcli.commands._utils.click_mutex import ClickMutex +from samcli.lib.build.app_builder import DEPRECATED_RUNTIMES from samcli.lib.utils.packagetype import IMAGE, ZIP from samcli.lib.utils.architecture import X86_64, ARM64 @@ -362,11 +363,11 @@ def do_cli( def _deprecate_notification(runtime): from samcli.lib.utils.colors import Colored - deprecated_runtimes = {"dotnetcore1.0", "dotnetcore2.0"} - if runtime in deprecated_runtimes: + if runtime in DEPRECATED_RUNTIMES: message = ( f"WARNING: {runtime} is no longer supported by AWS Lambda, please update to a newer supported runtime. " - f"See issue: https://github.com/awslabs/aws-sam-cli/issues/1934 for more details." + "For more information please check AWS Lambda Runtime Support Policy: " + "https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html" ) LOG.warning(Colored().yellow(message)) diff --git a/samcli/commands/init/init_templates.py b/samcli/commands/init/init_templates.py index 60ba0e2f40..066650f610 100644 --- a/samcli/commands/init/init_templates.py +++ b/samcli/commands/init/init_templates.py @@ -147,9 +147,9 @@ def get_preprocessed_manifest( https://github.com/aws/aws-sam-cli-app-templates/blob/master/manifest.json The structure of the manifest is shown below: { - "dotnetcore2.1": [ + "dotnetcore3.1": [ { - "directory": "dotnetcore2.1/cookiecutter-aws-sam-hello-dotnet", + "directory": "dotnetcore3.1/cookiecutter-aws-sam-hello-dotnet", "displayName": "Hello World Example", "dependencyManager": "cli-package", "appTemplate": "hello-world", diff --git a/samcli/lib/build/app_builder.py b/samcli/lib/build/app_builder.py index 73a738ba91..06ec719956 100644 --- a/samcli/lib/build/app_builder.py +++ b/samcli/lib/build/app_builder.py @@ -6,7 +6,7 @@ import json import logging import pathlib -from typing import List, Optional, Dict, cast, Union, NamedTuple +from typing import List, Optional, Dict, cast, Union, NamedTuple, Set import docker import docker.errors @@ -59,10 +59,21 @@ get_layer_subfolder, supports_build_in_container, CONFIG, + UnsupportedRuntimeException, ) LOG = logging.getLogger(__name__) +DEPRECATED_RUNTIMES: Set[str] = { + "nodejs4.3", + "nodejs6.10", + "nodejs8.10", + "nodejs10.x", + "dotnetcore2.0", + "dotnetcore2.1", + "python2.7", + "ruby2.5", +} BUILD_PROPERTIES = "BuildProperties" @@ -156,7 +167,7 @@ def __init__( self._stream_writer = stream_writer if stream_writer else StreamWriter(stream=osutils.stderr(), auto_flush=True) self._docker_client = docker_client if docker_client else docker.from_env() - self._deprecated_runtimes = {"nodejs4.3", "nodejs6.10", "nodejs8.10", "dotnetcore2.0"} + self._deprecated_runtimes = DEPRECATED_RUNTIMES self._colored = Colored() self._container_env_var = container_env_var self._container_env_var_file = container_env_var_file @@ -600,11 +611,12 @@ def _build_function( # pylint: disable=R1710 if packagetype == ZIP: if runtime in self._deprecated_runtimes: message = ( - f"WARNING: {runtime} is no longer supported by AWS Lambda, " - "please update to a newer supported runtime. SAM CLI " - "See issue: https://github.com/awslabs/aws-sam-cli/issues/1934 for more details." + f"Building functions with {runtime} is no longer supported by AWS SAM CLI, please " + f"update to a newer supported runtime. For more information please check AWS Lambda Runtime " + f"Support Policy: https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html" ) LOG.warning(self._colored.yellow(message)) + raise UnsupportedRuntimeException(f"Building functions with {runtime} is no longer supported") # Create the arguments to pass to the builder # Code is always relative to the given base directory. diff --git a/samcli/lib/build/workflow_config.py b/samcli/lib/build/workflow_config.py index 3a2ee3b860..1e2bca2a3b 100644 --- a/samcli/lib/build/workflow_config.py +++ b/samcli/lib/build/workflow_config.py @@ -155,7 +155,6 @@ def get_selector( def get_layer_subfolder(build_workflow: str) -> str: subfolders_by_runtime = { - "python2.7": "python", "python3.6": "python", "python3.7": "python", "python3.8": "python", @@ -163,10 +162,8 @@ def get_layer_subfolder(build_workflow: str) -> str: "nodejs4.3": "nodejs", "nodejs6.10": "nodejs", "nodejs8.10": "nodejs", - "nodejs10.x": "nodejs", "nodejs12.x": "nodejs", "nodejs14.x": "nodejs", - "ruby2.5": "ruby/lib", "ruby2.7": "ruby/lib", "java8": "java", "java11": "java", @@ -203,7 +200,7 @@ def get_workflow_config( specified_workflow str Workflow to be used, if directly specified. They are currently scoped to "makefile" and the official runtime - identifier names themselves, eg: nodejs10.x. If a workflow is not directly specified, + identifier names themselves, eg: nodejs14.x. If a workflow is not directly specified, it is calculated by the current method based on the runtime. Returns @@ -215,17 +212,13 @@ def get_workflow_config( selectors_by_build_method = {"makefile": BasicWorkflowSelector(PROVIDED_MAKE_CONFIG)} selectors_by_runtime = { - "python2.7": BasicWorkflowSelector(PYTHON_PIP_CONFIG), "python3.6": BasicWorkflowSelector(PYTHON_PIP_CONFIG), "python3.7": BasicWorkflowSelector(PYTHON_PIP_CONFIG), "python3.8": BasicWorkflowSelector(PYTHON_PIP_CONFIG), "python3.9": BasicWorkflowSelector(PYTHON_PIP_CONFIG), - "nodejs10.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG), "nodejs12.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG), "nodejs14.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG), - "ruby2.5": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG), "ruby2.7": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG), - "dotnetcore2.1": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG), "dotnetcore3.1": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG), "go1.x": BasicWorkflowSelector(GO_MOD_CONFIG), # When Maven builder exists, add to this list so we can automatically choose a builder based on the supported diff --git a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/cookiecutter.json b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/cookiecutter.json index 04c11c668b..9bf09d0306 100644 --- a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/cookiecutter.json +++ b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/cookiecutter.json @@ -1,6 +1,6 @@ { "project_name": "Name of the project", - "runtime": "dotnetcore2.1", + "runtime": "dotnetcore3.1", "architectures": { "value": [ "x86_64" diff --git a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/src/HelloWorld/HelloWorld.csproj b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/src/HelloWorld/HelloWorld.csproj index 76903a6269..fa0006c742 100644 --- a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/src/HelloWorld/HelloWorld.csproj +++ b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/src/HelloWorld/HelloWorld.csproj @@ -1,9 +1,7 @@ - {%- if cookiecutter.runtime == 'dotnetcore2.1' %} - netcoreapp2.1 - {%- else %} + {%- if cookiecutter.runtime == '3.1' %} netcoreapp3.1 {%- endif %} true diff --git a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/src/HelloWorld/aws-lambda-tools-defaults.json b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/src/HelloWorld/aws-lambda-tools-defaults.json index b913652d53..34ae747e11 100644 --- a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/src/HelloWorld/aws-lambda-tools-defaults.json +++ b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/src/HelloWorld/aws-lambda-tools-defaults.json @@ -11,9 +11,7 @@ "profile":"", "region" : "", "configuration": "Release", - {%- if cookiecutter.runtime == 'dotnetcore2.1' %} - "framework": "netcoreapp2.1", - {%- else %} + {%- if cookiecutter.runtime == 'dotnetcore3.1' %} "framework" : "netcoreapp3.1", {%- endif %} "function-runtime":"{{ cookiecutter.runtime }}", diff --git a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/template.yaml b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/template.yaml index b9a0354a7f..4bcfaa9d43 100644 --- a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/template.yaml +++ b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/template.yaml @@ -14,9 +14,7 @@ Resources: Properties: CodeUri: ./src/HelloWorld/ Handler: HelloWorld::HelloWorld.Function::FunctionHandler - {%- if cookiecutter.runtime == 'dotnetcore2.1' %} - Runtime: {{ cookiecutter.runtime }} - {%- else %} + {%- if cookiecutter.runtime == 'dotnetcore3.1' %} Runtime: dotnetcore3.1 {%- endif %} Architectures: diff --git a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/test/HelloWorld.Test/HelloWorld.Tests.csproj b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/test/HelloWorld.Test/HelloWorld.Tests.csproj index d0e31b1d74..9f36d6c977 100644 --- a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/test/HelloWorld.Test/HelloWorld.Tests.csproj +++ b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/test/HelloWorld.Test/HelloWorld.Tests.csproj @@ -1,11 +1,7 @@ - {%- if cookiecutter.runtime == 'dotnetcore2.0' %} - netcoreapp2.0 - {%- elif cookiecutter.runtime == 'dotnetcore2.1' %} - netcoreapp2.1 - {%- else %} + {%- if cookiecutter.runtime == 'dotnetcore3.1' %} netcoreapp3.1 {%- endif %} diff --git a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-python/README.md b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-python/README.md index d85255a94c..38b7b7bd48 100644 --- a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-python/README.md +++ b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-python/README.md @@ -12,7 +12,6 @@ Generate a boilerplate template in your current project directory using the foll * **Python 3.7**: `sam init --runtime python3.7` * **Python 3.6**: `sam init --runtime python3.6` -* **Python 2.7**: `sam init --runtime python2.7` > **NOTE**: ``--name`` allows you to specify a different project folder name (`sam-app` is the default) diff --git a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-python/{{cookiecutter.project_name}}/README.md b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-python/{{cookiecutter.project_name}}/README.md index 88a83a206f..74b322c7a4 100644 --- a/samcli/lib/init/templates/cookiecutter-aws-sam-hello-python/{{cookiecutter.project_name}}/README.md +++ b/samcli/lib/init/templates/cookiecutter-aws-sam-hello-python/{{cookiecutter.project_name}}/README.md @@ -30,11 +30,7 @@ The Serverless Application Model Command Line Interface (SAM CLI) is an extensio To use the SAM CLI, you need the following tools. * SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) -{%- if cookiecutter.runtime == 'python2.7' %} -* [Python 2.7 installed](https://www.python.org/downloads/) -{%- else %} -* [Python 3 installed](https://www.python.org/downloads/) -{%- endif %} +* [Python 3 installed] * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) To build and deploy your application for the first time, run the following in your shell: diff --git a/samcli/lib/providers/sam_function_provider.py b/samcli/lib/providers/sam_function_provider.py index f6984d8461..a7090b6ca4 100644 --- a/samcli/lib/providers/sam_function_provider.py +++ b/samcli/lib/providers/sam_function_provider.py @@ -21,6 +21,7 @@ from .provider import Function, LayerVersion, Stack from .sam_base_provider import SamBaseProvider from .sam_stack_provider import SamLocalStackProvider +from ..build.app_builder import DEPRECATED_RUNTIMES LOG = logging.getLogger(__name__) @@ -62,7 +63,6 @@ def __init__( self._stacks, use_raw_codeuri, ignore_code_extraction_warnings ) - self._deprecated_runtimes = {"nodejs4.3", "nodejs6.10", "nodejs8.10", "dotnetcore2.0"} self._colored = Colored() @property @@ -131,11 +131,11 @@ def get(self, name: str) -> Optional[Function]: return resolved_function def _deprecate_notification(self, runtime: Optional[str]) -> None: - if runtime in self._deprecated_runtimes: + if runtime in DEPRECATED_RUNTIMES: message = ( - f"WARNING: {runtime} is no longer supported by AWS Lambda, " - "please update to a newer supported runtime. SAM CLI " - "See issue: https://github.com/awslabs/aws-sam-cli/issues/1934 for more details." + f"WARNING: {runtime} is no longer supported by AWS Lambda, please update to a newer supported " + "runtime. For more information please check AWS Lambda Runtime Support Policy: " + "https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html" ) LOG.warning(self._colored.yellow(message)) diff --git a/samcli/lib/utils/architecture.py b/samcli/lib/utils/architecture.py index d7a05e1761..e2a7704533 100644 --- a/samcli/lib/utils/architecture.py +++ b/samcli/lib/utils/architecture.py @@ -14,21 +14,17 @@ ARM64 = "arm64" SUPPORTED_RUNTIMES: Dict[str, List[str]] = { - "nodejs10.x": [X86_64], "nodejs12.x": [ARM64, X86_64], "nodejs14.x": [ARM64, X86_64], - "python2.7": [X86_64], "python3.6": [X86_64], "python3.7": [X86_64], "python3.8": [ARM64, X86_64], "python3.9": [ARM64, X86_64], - "ruby2.5": [X86_64], "ruby2.7": [ARM64, X86_64], "java8": [X86_64], "java8.al2": [ARM64, X86_64], "java11": [ARM64, X86_64], "go1.x": [X86_64], - "dotnetcore2.1": [X86_64], "dotnetcore3.1": [ARM64, X86_64], "provided": [X86_64], "provided.al2": [ARM64, X86_64], diff --git a/samcli/local/common/runtime_template.py b/samcli/local/common/runtime_template.py index c7e7890592..be571f91f2 100644 --- a/samcli/local/common/runtime_template.py +++ b/samcli/local/common/runtime_template.py @@ -15,7 +15,7 @@ RUNTIME_DEP_TEMPLATE_MAPPING = { "python": [ { - "runtimes": ["python3.9", "python3.8", "python3.7", "python3.6", "python2.7"], + "runtimes": ["python3.9", "python3.8", "python3.7", "python3.6"], "dependency_manager": "pip", "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-python"), "build": True, @@ -23,7 +23,7 @@ ], "ruby": [ { - "runtimes": ["ruby2.5", "ruby2.7"], + "runtimes": ["ruby2.7"], "dependency_manager": "bundler", "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-ruby"), "build": True, @@ -31,7 +31,7 @@ ], "nodejs": [ { - "runtimes": ["nodejs14.x", "nodejs12.x", "nodejs10.x"], + "runtimes": ["nodejs14.x", "nodejs12.x"], "dependency_manager": "npm", "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-nodejs"), "build": True, @@ -39,7 +39,7 @@ ], "dotnet": [ { - "runtimes": ["dotnetcore3.1", "dotnetcore2.1"], + "runtimes": ["dotnetcore3.1"], "dependency_manager": "cli-package", "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-dotnet"), "build": True, @@ -87,14 +87,10 @@ def get_local_lambda_images_location(mapping, runtime): "python3.8": ["pip"], "python3.7": ["pip"], "python3.6": ["pip"], - "python2.7": ["pip"], - "ruby2.5": ["bundler"], "ruby2.7": ["bundler"], "nodejs14.x": ["npm"], "nodejs12.x": ["npm"], - "nodejs10.x": ["npm"], "dotnetcore3.1": ["cli-package"], - "dotnetcore2.1": ["cli-package"], "go1.x": ["mod"], "java8": ["maven", "gradle"], "java11": ["maven", "gradle"], @@ -119,7 +115,6 @@ def get_local_lambda_images_location(mapping, runtime): # dotnetcore runtimes in descending order "dotnet5.0", "dotnetcore3.1", - "dotnetcore2.1", "go1.x", # java runtimes in descending order "java11", @@ -128,37 +123,30 @@ def get_local_lambda_images_location(mapping, runtime): # nodejs runtimes in descending order "nodejs14.x", "nodejs12.x", - "nodejs10.x", # python runtimes in descending order "python3.9", "python3.8", "python3.7", "python3.6", - "python2.7", # ruby runtimes in descending order "ruby2.7", - "ruby2.5", ] LAMBDA_IMAGES_RUNTIMES_MAP = { "dotnet5.0": "amazon/dotnet5.0-base", "dotnetcore3.1": "amazon/dotnetcore3.1-base", - "dotnetcore2.1": "amazon/dotnetcore2.1-base", "go1.x": "amazon/go1.x-base", "java11": "amazon/java11-base", "java8.al2": "amazon/java8.al2-base", "java8": "amazon/java8-base", "nodejs14.x": "amazon/nodejs14.x-base", "nodejs12.x": "amazon/nodejs12.x-base", - "nodejs10.x": "amazon/nodejs10.x-base", "python3.9": "amazon/python3.9-base", "python3.8": "amazon/python3.8-base", "python3.7": "amazon/python3.7-base", "python3.6": "amazon/python3.6-base", - "python2.7": "amazon/python2.7-base", "ruby2.7": "amazon/ruby2.7-base", - "ruby2.5": "amazon/ruby2.5-base", } LAMBDA_IMAGES_RUNTIMES = LAMBDA_IMAGES_RUNTIMES_MAP.values() diff --git a/samcli/local/docker/lambda_debug_settings.py b/samcli/local/docker/lambda_debug_settings.py index c22a871771..c7927382bf 100644 --- a/samcli/local/docker/lambda_debug_settings.py +++ b/samcli/local/docker/lambda_debug_settings.py @@ -83,10 +83,6 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime **_container_env_vars, }, ), - Runtime.dotnetcore21.value: lambda: DebugSettings( - entry + ["/var/runtime/bootstrap"] + debug_args_list, - container_env_vars={"_AWS_LAMBDA_DOTNET_DEBUGGING": "1", **_container_env_vars}, - ), Runtime.dotnetcore31.value: lambda: DebugSettings( entry + ["/var/runtime/bootstrap"] + debug_args_list, container_env_vars={"_AWS_LAMBDA_DOTNET_DEBUGGING": "1", **_container_env_vars}, @@ -101,20 +97,6 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime **_container_env_vars, }, ), - Runtime.nodejs10x.value: lambda: DebugSettings( - entry - + ["/var/lang/bin/node"] - + debug_args_list - + ["--no-lazy", "--expose-gc"] - + ["/var/runtime/index.js"], - container_env_vars={ - "NODE_PATH": "/opt/nodejs/node_modules:/opt/nodejs/node10/node_modules:/var/runtime/node_modules:" - "/var/runtime:/var/task", - "NODE_OPTIONS": f"--inspect-brk=0.0.0.0:{str(debug_port)} --max-http-header-size 81920", - "AWS_EXECUTION_ENV": "AWS_Lambda_nodejs10.x", - **_container_env_vars, - }, - ), Runtime.nodejs12x.value: lambda: DebugSettings( entry + ["/var/lang/bin/node"] @@ -143,10 +125,6 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime **_container_env_vars, }, ), - Runtime.python27.value: lambda: DebugSettings( - entry + ["/usr/bin/python2.7"] + debug_args_list + ["/var/runtime/awslambda/bootstrap.py"], - container_env_vars=_container_env_vars, - ), Runtime.python36.value: lambda: DebugSettings( entry + ["/var/lang/bin/python3.6"] + debug_args_list + ["/var/runtime/awslambda/bootstrap.py"], container_env_vars=_container_env_vars, diff --git a/samcli/local/docker/lambda_image.py b/samcli/local/docker/lambda_image.py index 825ab46a9c..77464f3131 100644 --- a/samcli/local/docker/lambda_image.py +++ b/samcli/local/docker/lambda_image.py @@ -27,21 +27,17 @@ class Runtime(Enum): - nodejs10x = "nodejs10.x" nodejs12x = "nodejs12.x" nodejs14x = "nodejs14.x" - python27 = "python2.7" python36 = "python3.6" python37 = "python3.7" python38 = "python3.8" python39 = "python3.9" - ruby25 = "ruby2.5" ruby27 = "ruby2.7" java8 = "java8" java8al2 = "java8.al2" java11 = "java11" go1x = "go1.x" - dotnetcore21 = "dotnetcore2.1" dotnetcore31 = "dotnetcore3.1" provided = "provided" providedal2 = "provided.al2" diff --git a/tests/integration/buildcmd/test_build_cmd.py b/tests/integration/buildcmd/test_build_cmd.py index 051ea7bc1d..1c972dc290 100644 --- a/tests/integration/buildcmd/test_build_cmd.py +++ b/tests/integration/buildcmd/test_build_cmd.py @@ -252,14 +252,12 @@ def _validate_skipped_built_function( "prop", ), [ - ("template.yaml", "Function", True, "python2.7", "Python", False, False, "CodeUri"), ("template.yaml", "Function", True, "python3.6", "Python", False, False, "CodeUri"), ("template.yaml", "Function", True, "python3.7", "Python", False, False, "CodeUri"), ("template.yaml", "Function", True, "python3.8", "Python", False, False, "CodeUri"), ("template.yaml", "Function", True, "python3.9", "Python", False, False, "CodeUri"), ("template.yaml", "Function", True, "python3.7", "PythonPEP600", False, False, "CodeUri"), ("template.yaml", "Function", True, "python3.8", "PythonPEP600", False, False, "CodeUri"), - ("template.yaml", "Function", True, "python2.7", "Python", "use_container", False, "CodeUri"), ("template.yaml", "Function", True, "python3.6", "Python", "use_container", False, "CodeUri"), ("template.yaml", "Function", True, "python3.7", "Python", "use_container", False, "CodeUri"), ("template.yaml", "Function", True, "python3.8", "Python", "use_container", False, "CodeUri"), @@ -278,7 +276,7 @@ def _validate_skipped_built_function( ) class TestBuildCommand_PythonFunctions(BuildIntegPythonBase): overrides = True - runtime = "python2.7" + runtime = "python3.9" codeuri = "Python" use_container = False check_function_only = False @@ -304,14 +302,12 @@ class TestBuildCommand_PythonFunctions_With_Specified_Architecture(BuildIntegPyt @parameterized.expand( [ - ("python2.7", "Python", False, "x86_64"), ("python3.6", "Python", False, "x86_64"), ("python3.7", "Python", False, "x86_64"), ("python3.8", "Python", False, "x86_64"), # numpy 1.20.3 (in PythonPEP600/requirements.txt) only support python 3.7+ ("python3.7", "PythonPEP600", False, "x86_64"), ("python3.8", "PythonPEP600", False, "x86_64"), - ("python2.7", "Python", "use_container", "x86_64"), ("python3.6", "Python", "use_container", "x86_64"), ("python3.7", "Python", "use_container", "x86_64"), ("python3.8", "Python", "use_container", "x86_64"), @@ -352,10 +348,8 @@ def test_unsupported_runtime(self): class TestBuildCommand_NodeFunctions(BuildIntegNodeBase): @parameterized.expand( [ - ("nodejs10.x", False), ("nodejs12.x", False), ("nodejs14.x", False), - ("nodejs10.x", "use_container"), ("nodejs12.x", "use_container"), ("nodejs14.x", "use_container"), ] @@ -414,10 +408,8 @@ class TestBuildCommand_NodeFunctions_With_Specified_Architecture(BuildIntegNodeB @parameterized.expand( [ - ("nodejs10.x", False, "x86_64"), ("nodejs12.x", False, "x86_64"), ("nodejs14.x", False, "x86_64"), - ("nodejs10.x", "use_container", "x86_64"), ("nodejs12.x", "use_container", "x86_64"), ("nodejs14.x", "use_container", "x86_64"), ("nodejs12.x", False, "arm64"), @@ -794,9 +786,7 @@ class TestBuildCommand_Dotnet_cli_package(BuildIntegBase): @parameterized.expand( [ - ("dotnetcore2.1", "Dotnetcore2.1", None), ("dotnetcore3.1", "Dotnetcore3.1", None), - ("dotnetcore2.1", "Dotnetcore2.1", "debug"), ("dotnetcore3.1", "Dotnetcore3.1", "debug"), ] ) @@ -850,7 +840,7 @@ def test_with_dotnetcore(self, runtime, code_uri, mode, architecture="x86_64"): ) self.verify_docker_container_cleanedup(runtime) - @parameterized.expand([("dotnetcore2.1", "Dotnetcore2.1"), ("dotnetcore3.1", "Dotnetcore3.1")]) + @parameterized.expand([("dotnetcore3.1", "Dotnetcore3.1")]) @skipIf(SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD, SKIP_DOCKER_MESSAGE) @pytest.mark.flaky(reruns=3) def test_must_fail_with_container(self, runtime, code_uri): diff --git a/tests/integration/telemetry/integ_base.py b/tests/integration/telemetry/integ_base.py index c9d05a7f12..5950baa995 100644 --- a/tests/integration/telemetry/integ_base.py +++ b/tests/integration/telemetry/integ_base.py @@ -81,30 +81,6 @@ def set_config(self, telemetry_enabled=None): def get_global_config(self): return self._gc - @staticmethod - def wait_for_process_terminate(process, timeout_seconds=5): - """ - This is needed because Python2's wait() method does *not* have a timeout - - Returns - ------- - Return code if the process exited within the timout. None, if process is still executing - """ - - start = timeit.default_timer() - retcode = None - - while (timeit.default_timer() - start) < timeout_seconds: - retcode = process.poll() - - if retcode is not None: - # Process exited - break - - time.sleep(0.1) # 100ms - - return retcode - class TelemetryServer(Thread): """ diff --git a/tests/integration/testdata/buildcmd/Dotnetcore2.1/HelloWorld.csproj b/tests/integration/testdata/buildcmd/Dotnetcore2.1/HelloWorld.csproj deleted file mode 100644 index dcc8fd0d20..0000000000 --- a/tests/integration/testdata/buildcmd/Dotnetcore2.1/HelloWorld.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netcoreapp2.1 - true - - - - - - - - - - - diff --git a/tests/integration/testdata/buildcmd/Dotnetcore2.1/Program.cs b/tests/integration/testdata/buildcmd/Dotnetcore2.1/Program.cs deleted file mode 100644 index bdc1092e6e..0000000000 --- a/tests/integration/testdata/buildcmd/Dotnetcore2.1/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Net.Http; -using System.Net.Http.Headers; -using Newtonsoft.Json; - -using Amazon.Lambda.Core; -using Amazon.Lambda.APIGatewayEvents; - -// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. -[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] - -namespace HelloWorld -{ - - public class Function - { - - public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) - { - return "{'message': 'Hello World'}"; - } - } -} diff --git a/tests/integration/testdata/buildcmd/Dotnetcore2.1/aws-lambda-tools-defaults.json b/tests/integration/testdata/buildcmd/Dotnetcore2.1/aws-lambda-tools-defaults.json deleted file mode 100644 index faee710ee6..0000000000 --- a/tests/integration/testdata/buildcmd/Dotnetcore2.1/aws-lambda-tools-defaults.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "Information" : [ - "This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.", - "To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.", - - "dotnet lambda help", - - "All the command line options for the Lambda command can be specified in this file." - ], - - "profile":"", - "region" : "", - "configuration": "Release", - "framework": "netcoreapp2.1", - "function-runtime":"dotnetcore2.1", - "function-memory-size" : 256, - "function-timeout" : 30, - "function-handler" : "HelloWorld::HelloWorld.Function::FunctionHandler" -} diff --git a/tests/integration/testdata/invoke/credential_tests/inprocess/template.yaml b/tests/integration/testdata/invoke/credential_tests/inprocess/template.yaml index 35d334f4f2..d5b0c32de6 100644 --- a/tests/integration/testdata/invoke/credential_tests/inprocess/template.yaml +++ b/tests/integration/testdata/invoke/credential_tests/inprocess/template.yaml @@ -13,7 +13,7 @@ Resources: Properties: CodeUri: dotnet/STS Handler: STS::STS.Function::FunctionHandler - Runtime: dotnetcore2.1 + Runtime: dotnetcore3.1 GoStsExample: Type: AWS::Serverless::Function Properties: diff --git a/tests/unit/commands/init/test_cli.py b/tests/unit/commands/init/test_cli.py index d7277c7e05..bea9198ab8 100644 --- a/tests/unit/commands/init/test_cli.py +++ b/tests/unit/commands/init/test_cli.py @@ -1921,10 +1921,10 @@ def test_must_process_manifest(self, _get_manifest_mock): preprocess_manifest = template.get_preprocessed_manifest() expected_result = { "Hello World Example": { - "dotnetcore2.1": { + "dotnetcore3.1": { "Zip": [ { - "directory": "dotnetcore2.1/cookiecutter-aws-sam-hello-dotnet", + "directory": "dotnetcore3.1/cookiecutter-aws-sam-hello-dotnet", "displayName": "Hello World Example", "dependencyManager": "cli-package", "appTemplate": "hello-world", diff --git a/tests/unit/commands/init/test_manifest.json b/tests/unit/commands/init/test_manifest.json index 7aed62eee2..0ae5edf30f 100644 --- a/tests/unit/commands/init/test_manifest.json +++ b/tests/unit/commands/init/test_manifest.json @@ -1,7 +1,7 @@ { - "dotnetcore2.1": [ + "dotnetcore3.1": [ { - "directory": "dotnetcore2.1/cookiecutter-aws-sam-hello-dotnet", + "directory": "dotnetcore3.1/cookiecutter-aws-sam-hello-dotnet", "displayName": "Hello World Example", "dependencyManager": "cli-package", "appTemplate": "hello-world", diff --git a/tests/unit/commands/init/test_templates.py b/tests/unit/commands/init/test_templates.py index b23424c305..e599f2562f 100644 --- a/tests/unit/commands/init/test_templates.py +++ b/tests/unit/commands/init/test_templates.py @@ -18,7 +18,7 @@ def test_location_from_app_template_zip(self, subprocess_mock, git_exec_mock, cd it = InitTemplates() manifest = { - "ruby2.5": [ + "ruby2.7": [ { "directory": "mock-ruby-template", "displayName": "Hello World Example", @@ -34,7 +34,7 @@ def test_location_from_app_template_zip(self, subprocess_mock, git_exec_mock, cd with patch("samcli.cli.global_config.GlobalConfig.config_dir", new_callable=PropertyMock) as mock_cfg: mock_cfg.return_value = Path("/tmp/test-sam") with patch("samcli.commands.init.init_templates.open", m): - location = it.location_from_app_template(ZIP, "ruby2.5", None, "bundler", "hello-world") + location = it.location_from_app_template(ZIP, "ruby2.7", None, "bundler", "hello-world") self.assertTrue(search("mock-ruby-template", location)) @patch("samcli.lib.utils.git_repo.check_output") @@ -45,7 +45,7 @@ def test_location_from_app_template_image(self, subprocess_mock, git_exec_mock, it = InitTemplates() manifest = { - "ruby2.5-image": [ + "ruby2.7-image": [ { "directory": "mock-ruby-image-template", "displayName": "Hello World Lambda Image Example", @@ -62,6 +62,6 @@ def test_location_from_app_template_image(self, subprocess_mock, git_exec_mock, mock_cfg.return_value = Path("/tmp/test-sam") with patch("samcli.commands.init.init_templates.open", m): location = it.location_from_app_template( - IMAGE, None, "ruby2.5-image", "bundler", "hello-world-lambda-image" + IMAGE, None, "ruby2.7-image", "bundler", "hello-world-lambda-image" ) self.assertTrue(search("mock-ruby-image-template", location)) diff --git a/tests/unit/commands/samconfig/test_samconfig.py b/tests/unit/commands/samconfig/test_samconfig.py index 5f6f09a701..93e5104db3 100644 --- a/tests/unit/commands/samconfig/test_samconfig.py +++ b/tests/unit/commands/samconfig/test_samconfig.py @@ -43,7 +43,7 @@ def test_init(self, do_cli_mock): config_values = { "no_interactive": True, "location": "github.com", - "runtime": "nodejs10.x", + "runtime": "nodejs14.x", "dependency_manager": "maven", "output_dir": "myoutput", "name": "myname", @@ -71,7 +71,7 @@ def test_init(self, do_cli_mock): "github.com", False, ZIP, - "nodejs10.x", + "nodejs14.x", None, None, "maven", diff --git a/tests/unit/lib/build_module/test_app_builder.py b/tests/unit/lib/build_module/test_app_builder.py index 3c1163c6b9..2a3457cae7 100644 --- a/tests/unit/lib/build_module/test_app_builder.py +++ b/tests/unit/lib/build_module/test_app_builder.py @@ -11,6 +11,7 @@ from parameterized import parameterized +from samcli.lib.build.workflow_config import UnsupportedRuntimeException from samcli.lib.providers.provider import ResourcesToBuildCollector, Function from samcli.lib.build.app_builder import ( ApplicationBuilder, @@ -452,6 +453,19 @@ def test_must_raise_for_functions_with_multi_architecture(self, persist_mock, re msg = "Function name property Architectures should be a list of length 1" self.assertEqual(str(ex.exception), msg) + @parameterized.expand([("python2.7",), ("ruby2.5",), ("nodejs10.x",), ("dotnetcore2.1",)]) + def test_deprecated_runtimes(self, runtime): + with self.assertRaises(UnsupportedRuntimeException): + self.builder._build_function( + function_name="function_name", + codeuri="code_uri", + packagetype=ZIP, + runtime=runtime, + architecture="architecture", + handler="handler", + artifact_dir="artifact_dir", + ) + class PathValidator: def __init__(self, path): diff --git a/tests/unit/lib/build_module/test_build_graph.py b/tests/unit/lib/build_module/test_build_graph.py index a21bb09719..331dc46848 100644 --- a/tests/unit/lib/build_module/test_build_graph.py +++ b/tests/unit/lib/build_module/test_build_graph.py @@ -305,7 +305,7 @@ class TestBuildGraph(TestCase): packagetype = "{ZIP}" architecture = "{ARCHITECTURE_FIELD}" handler = "{HANDLER}" - functions = ["HelloWorldPython", "HelloWorldPython2"] + functions = ["HelloWorldPython", "HelloWorld2Python"] [function_build_definitions.{UUID}.metadata] Test = "{METADATA['Test']}" Test2 = "{METADATA['Test2']}" diff --git a/tests/unit/lib/build_module/test_build_strategy.py b/tests/unit/lib/build_module/test_build_strategy.py index d6521d77cf..48023dcdd6 100644 --- a/tests/unit/lib/build_module/test_build_strategy.py +++ b/tests/unit/lib/build_module/test_build_strategy.py @@ -267,7 +267,7 @@ class CachedBuildStrategyTest(BuildStrategyBaseTest): packagetype = "{ZIP}" runtime = "{RUNTIME}" source_hash = "{SOURCE_HASH}" - functions = ["HelloWorldPython", "HelloWorldPython2"] + functions = ["HelloWorldPython", "HelloWorld2Python"] [layer_build_definitions] [layer_build_definitions.{LAYER_UUID}] @@ -347,7 +347,7 @@ def test_if_cached_invalid_with_no_cached_folder(self, build_layer_mock, build_f cache_dir = Path(temp_base_dir, ".aws-sam", "cache") cache_dir.mkdir(parents=True) - build_function_mock.return_value = {"HelloWorldPython": "artifact1", "HelloWorldPython2": "artifact2"} + build_function_mock.return_value = {"HelloWorldPython": "artifact1", "HelloWorld2Python": "artifact2"} build_layer_mock.return_value = {"SumLayer": "artifact3"} build_graph_path = Path(build_dir.parent, "build.toml") @@ -580,7 +580,7 @@ def test_will_call_incremental_build_strategy( @parameterized.expand( [ - "dotnetcore2.1", + "dotnetcore3.1", "go1.x", "java11", ] diff --git a/tests/unit/lib/build_module/test_workflow_config.py b/tests/unit/lib/build_module/test_workflow_config.py index 6c067d504f..824447e732 100644 --- a/tests/unit/lib/build_module/test_workflow_config.py +++ b/tests/unit/lib/build_module/test_workflow_config.py @@ -14,7 +14,7 @@ def setUp(self): self.code_dir = "" self.project_dir = "" - @parameterized.expand([("python2.7",), ("python3.6",), ("python3.7",), ("python3.8",)]) + @parameterized.expand([("python3.6",), ("python3.7",), ("python3.8",)]) def test_must_work_for_python(self, runtime): result = get_workflow_config(runtime, self.code_dir, self.project_dir) @@ -24,7 +24,7 @@ def test_must_work_for_python(self, runtime): self.assertEqual(result.manifest_name, "requirements.txt") self.assertIsNone(result.executable_search_paths) - @parameterized.expand([("nodejs10.x",), ("nodejs12.x",)]) + @parameterized.expand([("nodejs12.x",), ("nodejs14.x",)]) def test_must_work_for_nodejs(self, runtime): result = get_workflow_config(runtime, self.code_dir, self.project_dir) @@ -58,7 +58,7 @@ def test_raise_exception_for_bad_specified_workflow(self, runtime): with self.assertRaises(UnsupportedBuilderException): get_workflow_config(runtime, self.code_dir, self.project_dir, specified_workflow="Wrong") - @parameterized.expand([("ruby2.5",), ("ruby2.7",)]) + @parameterized.expand([("ruby2.7",)]) def test_must_work_for_ruby(self, runtime): result = get_workflow_config(runtime, self.code_dir, self.project_dir) self.assertEqual(result.language, "ruby") diff --git a/tests/unit/lib/cli_validation/test_image_repository_validation.py b/tests/unit/lib/cli_validation/test_image_repository_validation.py index fff158e9b5..c312a4993f 100644 --- a/tests/unit/lib/cli_validation/test_image_repository_validation.py +++ b/tests/unit/lib/cli_validation/test_image_repository_validation.py @@ -186,13 +186,13 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, } }, @@ -215,13 +215,13 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, } }, @@ -244,13 +244,13 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, } }, @@ -273,19 +273,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFunc": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -294,7 +294,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -323,19 +323,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFunc": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -344,7 +344,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -370,19 +370,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFunc": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -391,7 +391,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -419,19 +419,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFunc": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -440,7 +440,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -470,19 +470,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFunc": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -491,7 +491,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -510,19 +510,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunctionInChild": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFuncInChild": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -531,7 +531,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -562,19 +562,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFunc": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -583,7 +583,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -602,19 +602,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunctionInChild": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFuncInChild": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -623,7 +623,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -658,19 +658,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunction": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFunc": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -679,7 +679,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -698,19 +698,19 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "CodeUri": ".", }, }, "LambdaFunctionInChild": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, }, "ServerlessImageFuncInChild": { "Type": "AWS::Serverless::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "ImageUri": ".", "PackageType": "Image", }, @@ -719,7 +719,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Type": "AWS::Lambda::Function", "Properties": { "Handler": "lambda.handler", - "Runtime": "nodejs10.x", + "Runtime": "nodejs14.x", "Code": {"ImageUri": "."}, "PackageType": "Image", }, @@ -751,7 +751,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -761,7 +761,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -788,7 +788,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -798,7 +798,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -825,7 +825,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -835,7 +835,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -862,7 +862,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -872,7 +872,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -932,7 +932,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -942,7 +942,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -1002,7 +1002,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -1012,7 +1012,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -1072,7 +1072,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -1082,7 +1082,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -1139,7 +1139,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -1149,7 +1149,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -1199,7 +1199,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunctionInChild1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunctionInChild1", "aws:cdk:path": "Stack/CDKLambdaFunctionInChild1/Resource", @@ -1209,7 +1209,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunctionInChild2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunctionInChild2", "aws:cdk:path": "Stack/CDKLambdaFunctionInChild2/Resource", @@ -1271,7 +1271,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -1281,7 +1281,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -1331,7 +1331,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunctionInChild1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunctionInChild1", "aws:cdk:path": "Stack/CDKLambdaFunctionInChild1/Resource", @@ -1341,7 +1341,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunctionInChild2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunctionInChild2", "aws:cdk:path": "Stack/CDKLambdaFunctionInChild2/Resource", @@ -1403,7 +1403,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -1413,7 +1413,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -1463,7 +1463,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunctionInChild1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunctionInChild1", "aws:cdk:path": "Stack/CDKLambdaFunctionInChild1/Resource", @@ -1473,7 +1473,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunctionInChild2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunctionInChild2", "aws:cdk:path": "Stack/CDKLambdaFunctionInChild2/Resource", @@ -1539,7 +1539,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunction1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction1", "aws:cdk:path": "Stack/CDKLambdaFunction1/Resource", @@ -1549,7 +1549,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunction2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunction2", "aws:cdk:path": "Stack/CDKLambdaFunction2/Resource", @@ -1599,7 +1599,7 @@ class TestIsAllImageFunctionsProvided(TestCase): "Resources": { "LambdaFunctionInChild1": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunctionInChild1", "aws:cdk:path": "Stack/CDKLambdaFunctionInChild1/Resource", @@ -1609,7 +1609,7 @@ class TestIsAllImageFunctionsProvided(TestCase): }, "LambdaFunctionInChild2": { "Type": "AWS::Lambda::Function", - "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs10.x", "Code": "."}, + "Properties": {"Handler": "lambda.handler", "Runtime": "nodejs14.x", "Code": "."}, "Metadata": { "SamResource": "CDKLambdaFunctionInChild2", "aws:cdk:path": "Stack/CDKLambdaFunctionInChild2/Resource", diff --git a/tests/unit/lib/utils/test_architecture.py b/tests/unit/lib/utils/test_architecture.py index 2d5f99f4ee..405529da82 100644 --- a/tests/unit/lib/utils/test_architecture.py +++ b/tests/unit/lib/utils/test_architecture.py @@ -42,7 +42,7 @@ def test_validate_architecture_errors(self, value): @parameterized.expand( [ - ("nodejs10.x", X86_64, ZIP), + ("nodejs14.x", X86_64, ZIP), ("java8.al2", ARM64, ZIP), ("dotnetcore3.1", ARM64, ZIP), (None, X86_64, IMAGE), @@ -59,10 +59,8 @@ def test_must_pass_for_support_runtime_architecture(self, runtime, arch, package @parameterized.expand( [ ("nodejs10.x", ARM64), - ("python2.7", ARM64), ("python3.6", ARM64), ("python3.7", ARM64), - ("ruby2.5", ARM64), ("java8", ARM64), ("go1.x", ARM64), ("provided", ARM64), diff --git a/tests/unit/local/docker/test_lambda_build_container.py b/tests/unit/local/docker/test_lambda_build_container.py index 12e0b2c8cc..51def8f5fb 100644 --- a/tests/unit/local/docker/test_lambda_build_container.py +++ b/tests/unit/local/docker/test_lambda_build_container.py @@ -170,7 +170,7 @@ class TestLambdaBuildContainer_get_image(TestCase): @parameterized.expand( [ ("myruntime", ARM64, "public.ecr.aws/sam/build-myruntime:latest-arm64"), - ("nodejs10.x", X86_64, "public.ecr.aws/sam/build-nodejs10.x:latest-x86_64"), + ("nodejs14.x", X86_64, "public.ecr.aws/sam/build-nodejs14.x:latest-x86_64"), ] ) def test_must_get_image_name(self, runtime, architecture, expected_image_name): diff --git a/tests/unit/local/docker/test_lambda_container.py b/tests/unit/local/docker/test_lambda_container.py index 1954b4d070..0cdbcc1c05 100644 --- a/tests/unit/local/docker/test_lambda_container.py +++ b/tests/unit/local/docker/test_lambda_container.py @@ -12,16 +12,14 @@ from samcli.local.docker.lambda_debug_settings import DebuggingNotSupported from samcli.local.docker.lambda_image import RAPID_IMAGE_TAG_PREFIX -RUNTIMES_WITH_ENTRYPOINT = [Runtime.dotnetcore21.value, Runtime.dotnetcore31.value, Runtime.go1x.value] +RUNTIMES_WITH_ENTRYPOINT = [Runtime.dotnetcore31.value, Runtime.go1x.value] RUNTIMES_WITH_BOOTSTRAP_ENTRYPOINT = [ - Runtime.nodejs10x.value, Runtime.nodejs12x.value, Runtime.nodejs14x.value, Runtime.python37.value, Runtime.python38.value, Runtime.python36.value, - Runtime.python27.value, Runtime.python39.value, ] @@ -29,7 +27,6 @@ Runtime.java11.value, Runtime.java8.value, Runtime.java8al2.value, - Runtime.dotnetcore21.value, Runtime.dotnetcore31.value, Runtime.go1x.value, ] diff --git a/tests/unit/local/docker/test_lambda_debug_settings.py b/tests/unit/local/docker/test_lambda_debug_settings.py index 59329186cb..14fce81184 100644 --- a/tests/unit/local/docker/test_lambda_debug_settings.py +++ b/tests/unit/local/docker/test_lambda_debug_settings.py @@ -9,13 +9,10 @@ Runtime.java8, Runtime.java8al2, Runtime.java11, - Runtime.dotnetcore21, Runtime.dotnetcore31, Runtime.go1x, - Runtime.nodejs10x, Runtime.nodejs12x, Runtime.nodejs14x, - Runtime.python27, Runtime.python36, Runtime.python37, Runtime.python38,