diff --git a/samcli/__init__.py b/samcli/__init__.py index f2234ebf97..b1cb11c1bd 100644 --- a/samcli/__init__.py +++ b/samcli/__init__.py @@ -2,4 +2,4 @@ SAM CLI version """ -__version__ = "1.132.0" +__version__ = "1.133.0" diff --git a/samcli/cli/types.py b/samcli/cli/types.py index a3743128ad..71801c04b6 100644 --- a/samcli/cli/types.py +++ b/samcli/cli/types.py @@ -6,10 +6,14 @@ import logging import re from json import JSONDecodeError +from pathlib import Path from typing import Dict, List, Optional, Union import click +from ruamel.yaml.comments import CommentedMap, CommentedSeq + +from samcli.lib.config.file_manager import FILE_MANAGER_MAPPER from samcli.lib.package.ecr_utils import is_ecr_url PARAM_AND_METADATA_KEY_REGEX = """([A-Za-z0-9\\"\']+)""" @@ -60,6 +64,28 @@ def _unquote_wrapped_quotes(value): return value.replace("\\ ", " ").replace('\\"', '"').replace("\\'", "'") +def _flatten_list(data: list) -> list: + """ + Recursively flattens lists and other list-like types for easy sequential processing. + This also helps with lists combined with YAML anchors & aliases. + + Parameters + ---------- + value : data + List to flatten + + Returns + ------- + Flattened list + """ + flat_data = [] + for item in data: + if isinstance(item, (tuple, list, CommentedSeq)): + flat_data.extend(_flatten_list(item)) + else: + flat_data.append(item) + return flat_data + class CfnParameterOverridesType(click.ParamType): """ @@ -69,6 +95,8 @@ class CfnParameterOverridesType(click.ParamType): __EXAMPLE_1 = "ParameterKey=KeyPairName,ParameterValue=MyKey ParameterKey=InstanceType,ParameterValue=t1.micro" __EXAMPLE_2 = "KeyPairName=MyKey InstanceType=t1.micro" + __EXAMPLE_3 = "file://MyParams.yaml" + # Regex that parses CloudFormation parameter key-value pairs: # https://regex101.com/r/xqfSjW/2 @@ -86,45 +114,76 @@ class CfnParameterOverridesType(click.ParamType): ordered_pattern_match = [_pattern_1, _pattern_2] - name = "string,list" - - def convert(self, value, param, ctx): - result = {} - - # Empty tuple - if value == ("",): - return result - - value = (value,) if isinstance(value, str) else value - for val in value: - # Add empty string to start of the string to help match `_pattern2` - normalized_val = " " + val.strip() - - try: - # NOTE(TheSriram): find the first regex that matched. - # pylint is concerned that we are checking at the same `val` within the loop, - # but that is the point, so disabling it. - pattern = next( - i - for i in filter( - lambda item: re.findall(item, normalized_val), self.ordered_pattern_match - ) # pylint: disable=cell-var-from-loop - ) - except StopIteration: - return self.fail( - "{} is not in valid format. It must look something like '{}' or '{}'".format( - val, self.__EXAMPLE_1, self.__EXAMPLE_2 - ), + def _normalize_parameters(self, values, param, ctx): + """ + Normalizes parameter overrides into key-value pairs of strings + Later keys overwrite previous ones in case of key conflict + """ + if values in (("",), "", None) or values == {}: + LOG.debug("Empty parameter set (%s)", values) + return {} + + LOG.debug("Input parameters: %s", values) + values = _flatten_list([values]) + LOG.debug("Flattened parameters: %s", values) + + parameters = {} + for value in values: + if isinstance(value, str): + if value.startswith('file://'): + filepath = Path(value[7:]) + if not filepath.is_file(): + self.fail(f"{value} was not found or is a directory", param, ctx) + file_manager = FILE_MANAGER_MAPPER.get(filepath.suffix, None) + if not file_manager: + self.fail(f"{value} uses an unsupported extension", param, ctx) + parameters |= self._normalize_parameters(file_manager.read(filepath), param, ctx) + else: + # Legacy parameter matching + normalized_value = " " + value.strip() + for pattern in self.ordered_pattern_match: + groups = re.findall(pattern, normalized_value) + if groups: + parameters |= groups + break + else: + self.fail( + f"{value} is not a valid format. It must look something like '{self.__EXAMPLE_1}', '{self.__EXAMPLE_2}', or '{self.__EXAMPLE_3}'", + param, + ctx, + ) + elif isinstance(value, (dict, CommentedMap)): + # e.g. YAML key-value pairs + for k, v in value.items(): + if isinstance(v, (list, CommentedSeq)): + # Collapse list values to comma delimited + parameters[str(k)] = ",".join(map(str, v)) + else: + parameters[str(k)] = str(v) + else: + self.fail( + f"{value} is not valid in a way the code doesn't expect", param, ctx, ) - groups = re.findall(pattern, normalized_val) + result = {} + for key, param_value in parameters.items(): + result[_unquote_wrapped_quotes(key)] = _unquote_wrapped_quotes(param_value) + LOG.debug("Output parameters: %s", result) + return result - # 'groups' variable is a list of tuples ex: [(key1, value1), (key2, value2)] - for key, param_value in groups: - result[_unquote_wrapped_quotes(key)] = _unquote_wrapped_quotes(param_value) + def convert(self, values, param, ctx): + # Merge samconfig with CLI parameter-overrides + if isinstance(values, tuple): # Tuple implies CLI + # default_map was populated from samconfig + default_map = ctx.default_map.get('parameter_overrides', {}) + LOG.debug("Default map: %s", default_map) + LOG.debug("Current values: %s", values) + # Easy merge - will flatten later + values = [default_map] + [values] + result = self._normalize_parameters(values, param, ctx) return result diff --git a/samcli/lib/build/app_builder.py b/samcli/lib/build/app_builder.py index f99a9d3fa8..607c65a73c 100644 --- a/samcli/lib/build/app_builder.py +++ b/samcli/lib/build/app_builder.py @@ -61,6 +61,7 @@ AWS_SERVERLESS_LAYERVERSION, ) from samcli.lib.utils.stream_writer import StreamWriter +from samcli.local.docker.container import ContainerContext from samcli.local.docker.lambda_build_container import LambdaBuildContainer from samcli.local.docker.manager import ContainerManager, DockerImagePullFailedException from samcli.local.docker.utils import get_docker_platform, is_docker_reachable @@ -968,7 +969,7 @@ def _build_function_on_container( try: try: - self._container_manager.run(container) + self._container_manager.run(container, context=ContainerContext.BUILD) except docker.errors.APIError as ex: if "executable file not found in $PATH" in str(ex): raise UnsupportedBuilderLibraryVersionError( diff --git a/samcli/local/docker/container.py b/samcli/local/docker/container.py index a34e96c7c1..283eaffe53 100644 --- a/samcli/local/docker/container.py +++ b/samcli/local/docker/container.py @@ -13,6 +13,7 @@ import tempfile import threading import time +from enum import Enum from typing import Dict, Iterator, Optional, Tuple, Union import docker @@ -59,6 +60,11 @@ class ContainerConnectionTimeoutException(Exception): """ +class ContainerContext(Enum): + BUILD = "build" + INVOKE = "invoke" + + class Container: """ Represents an instance of a Docker container with a specific configuration. The container is not actually created @@ -157,11 +163,14 @@ def __init__( except NoFreePortsError as ex: raise ContainerNotStartableException(str(ex)) from ex - def create(self): + def create(self, context): """ Calls Docker API to creates the Docker container instance. Creating the container does *not* run the container. Use ``start`` method to run the container + context: samcli.local.docker.container.ContainerContext + Context for the container management to run (build, invoke) + :return string: ID of the created container :raise RuntimeError: If this method is called after a container already has been created """ @@ -174,6 +183,7 @@ def create(self): if self._host_dir: mount_mode = "rw,delegated" if self._mount_with_write else "ro,delegated" LOG.info("Mounting %s as %s:%s, inside runtime container", self._host_dir, self._working_dir, mount_mode) + mapped_symlinks = self._create_mapped_symlink_files() if self._resolve_symlinks(context) else {} _volumes = { self._host_dir: { @@ -182,7 +192,7 @@ def create(self): "bind": self._working_dir, "mode": mount_mode, }, - **self._create_mapped_symlink_files(), + **mapped_symlinks, } kwargs = { @@ -648,3 +658,18 @@ def is_running(self): return real_container.status == "running" except docker.errors.NotFound: return False + + def _resolve_symlinks(self, context) -> bool: + """_summary_ + + Parameters + ---------- + context : sacli.local.docker.container.ContainerContext + Context for the container management to run. (build, invoke) + + Returns + ------- + bool + True, if given these parameters it should resolve symlinks or not + """ + return bool(context != ContainerContext.BUILD) diff --git a/samcli/local/docker/manager.py b/samcli/local/docker/manager.py index ceda43ce8e..531564c233 100644 --- a/samcli/local/docker/manager.py +++ b/samcli/local/docker/manager.py @@ -12,7 +12,7 @@ from samcli.lib.constants import DOCKER_MIN_API_VERSION from samcli.lib.utils.stream_writer import StreamWriter from samcli.local.docker import utils -from samcli.local.docker.container import Container +from samcli.local.docker.container import Container, ContainerContext from samcli.local.docker.lambda_image import LambdaImage LOG = logging.getLogger(__name__) @@ -55,7 +55,7 @@ def is_docker_reachable(self): """ return utils.is_docker_reachable(self.docker_client) - def create(self, container): + def create(self, container, context): """ Create a container based on the given configuration. @@ -63,6 +63,8 @@ def create(self, container): ---------- container samcli.local.docker.container.Container: Container to be created + context: samcli.local.docker.container.ContainerContext + Context for the container management to run. (build, invoke) Raises ------ @@ -93,9 +95,9 @@ def create(self, container): LOG.info("Failed to download a new %s image. Invoking with the already downloaded image.", image_name) container.network_id = self.docker_network_id - container.create() + container.create(context) - def run(self, container, input_data=None): + def run(self, container, context: ContainerContext, input_data=None): """ Run a Docker container based on the given configuration. If the container is not created, it will call Create method to create. @@ -104,6 +106,8 @@ def run(self, container, input_data=None): ---------- container: samcli.local.docker.container.Container Container to create and run + context: samcli.local.docker.container.ContainerContext + Context for the container management to run. (build, invoke) input_data: str, optional Input data sent to the container through container's stdin. @@ -113,8 +117,7 @@ def run(self, container, input_data=None): If the Docker image was not available in the server """ if not container.is_created(): - self.create(container) - + self.create(container, context) container.start(input_data=input_data) def stop(self, container: Container) -> None: diff --git a/samcli/local/lambdafn/runtime.py b/samcli/local/lambdafn/runtime.py index dbe784c1c5..778dc27e76 100644 --- a/samcli/local/lambdafn/runtime.py +++ b/samcli/local/lambdafn/runtime.py @@ -14,7 +14,7 @@ from samcli.lib.telemetry.metric import capture_parameter from samcli.lib.utils.file_observer import LambdaFunctionObserver from samcli.lib.utils.packagetype import ZIP -from samcli.local.docker.container import Container +from samcli.local.docker.container import Container, ContainerContext from samcli.local.docker.container_analyzer import ContainerAnalyzer from samcli.local.docker.exceptions import ContainerFailureError, DockerContainerCreationFailedException from samcli.local.docker.lambda_container import LambdaContainer @@ -113,7 +113,7 @@ def create( ) try: # create the container. - self._container_manager.create(container) + self._container_manager.create(container, ContainerContext.INVOKE) return container except DockerContainerCreationFailedException: @@ -174,7 +174,7 @@ def run( try: # start the container. - self._container_manager.run(container) + self._container_manager.run(container, ContainerContext.INVOKE) return container except KeyboardInterrupt: diff --git a/tests/integration/deploy/test_deploy_command.py b/tests/integration/deploy/test_deploy_command.py index 5404e65ed3..cd85bb9469 100644 --- a/tests/integration/deploy/test_deploy_command.py +++ b/tests/integration/deploy/test_deploy_command.py @@ -26,13 +26,13 @@ class TestDeploy(DeployIntegBase): def setUpClass(cls): cls.docker_client = docker.from_env() cls.local_images = [ - ("public.ecr.aws/sam/emulation-python3.8", "latest"), + ("public.ecr.aws/sam/emulation-python3.9", "latest"), ] # setup some images locally by pulling them. for repo, tag in cls.local_images: cls.docker_client.api.pull(repository=repo, tag=tag) - cls.docker_client.api.tag(f"{repo}:{tag}", "emulation-python3.8", tag="latest") - cls.docker_client.api.tag(f"{repo}:{tag}", "emulation-python3.8-2", tag="latest") + cls.docker_client.api.tag(f"{repo}:{tag}", "emulation-python3.9", tag="latest") + cls.docker_client.api.tag(f"{repo}:{tag}", "emulation-python3.9-2", tag="latest") cls.docker_client.api.tag(f"{repo}:{tag}", "colorsrandomfunctionf61b9209", tag="latest") # setup signing profile arn & name diff --git a/tests/integration/local/invoke/test_invoke_terraform_applications.py b/tests/integration/local/invoke/test_invoke_terraform_applications.py index e810696118..0f6d74e4c6 100644 --- a/tests/integration/local/invoke/test_invoke_terraform_applications.py +++ b/tests/integration/local/invoke/test_invoke_terraform_applications.py @@ -210,7 +210,7 @@ def setUpClass(cls): bytes('resource "aws_lambda_function" "this" {' + os.linesep, "utf-8"), bytes(" filename = var.source_code" + os.linesep, "utf-8"), bytes(' handler = "app.lambda_handler"' + os.linesep, "utf-8"), - bytes(' runtime = "python3.8"' + os.linesep, "utf-8"), + bytes(' runtime = "python3.9"' + os.linesep, "utf-8"), bytes(" function_name = var.function_name" + os.linesep, "utf-8"), bytes(" role = aws_iam_role.iam_for_lambda.arn" + os.linesep, "utf-8"), bytes(f' layers = ["{_4th_layer_arn}"]' + os.linesep, "utf-8"), diff --git a/tests/integration/local/start_api/test_start_api.py b/tests/integration/local/start_api/test_start_api.py index f0d75e5dc5..b95f1c63b9 100644 --- a/tests/integration/local/start_api/test_start_api.py +++ b/tests/integration/local/start_api/test_start_api.py @@ -1549,9 +1549,9 @@ def assert_cors(self, response): self.assertEqual(response.headers.get("Access-Control-Allow-Credentials"), "true") self.assertEqual(response.headers.get("Access-Control-Max-Age"), "510") + @parameterized.expand(["https://abc", None]) @pytest.mark.flaky(reruns=3) @pytest.mark.timeout(timeout=600, method="thread") - @parameterized.expand(["https://abc", None]) def test_cors_swagger_options(self, origin): """ This tests that the Cors headers are added to OPTIONS responses @@ -1559,9 +1559,9 @@ def test_cors_swagger_options(self, origin): response = requests.options(self.url + "/echobase64eventbody", **_create_request_params(origin)) self.assert_cors(response) + @parameterized.expand(["https://abc", None]) @pytest.mark.flaky(reruns=3) @pytest.mark.timeout(timeout=600, method="thread") - @parameterized.expand(["https://abc", None]) def test_cors_swagger_get(self, origin): """ This tests that the Cors headers are added to _other_ method responses @@ -1685,9 +1685,9 @@ class TestServiceCorsGlobalRequests(StartApiIntegBaseClass): def setUp(self): self.url = "http://127.0.0.1:{}".format(self.port) + @parameterized.expand(["https://abc", None]) @pytest.mark.flaky(reruns=3) @pytest.mark.timeout(timeout=600, method="thread") - @parameterized.expand(["https://abc", None]) def test_cors_global(self, origin): """ This tests that the Cors headers are added to OPTIONS response when the global property is set diff --git a/tests/integration/local/start_lambda/test_start_lambda_terraform_applications.py b/tests/integration/local/start_lambda/test_start_lambda_terraform_applications.py index 3a24bfbd80..279ec65e74 100644 --- a/tests/integration/local/start_lambda/test_start_lambda_terraform_applications.py +++ b/tests/integration/local/start_lambda/test_start_lambda_terraform_applications.py @@ -213,7 +213,7 @@ def setUpClass(cls): bytes('resource "aws_lambda_function" "this" {' + os.linesep, "utf-8"), bytes(" filename = var.source_code" + os.linesep, "utf-8"), bytes(' handler = "app.lambda_handler"' + os.linesep, "utf-8"), - bytes(' runtime = "python3.8"' + os.linesep, "utf-8"), + bytes(' runtime = "python3.9"' + os.linesep, "utf-8"), bytes(" function_name = var.function_name" + os.linesep, "utf-8"), bytes(" role = aws_iam_role.iam_for_lambda.arn" + os.linesep, "utf-8"), bytes(f' layers = ["{_4th_layer_arn}"]' + os.linesep, "utf-8"), diff --git a/tests/integration/package/test_package_command_image.py b/tests/integration/package/test_package_command_image.py index 5e8405d922..71299dc39c 100644 --- a/tests/integration/package/test_package_command_image.py +++ b/tests/integration/package/test_package_command_image.py @@ -26,13 +26,13 @@ class TestPackageImage(PackageIntegBase): def setUpClass(cls): cls.docker_client = docker.from_env() cls.local_images = [ - ("public.ecr.aws/sam/emulation-python3.8", "latest"), + ("public.ecr.aws/sam/emulation-python3.9", "latest"), ] # setup some images locally by pulling them. for repo, tag in cls.local_images: cls.docker_client.api.pull(repository=repo, tag=tag) - cls.docker_client.api.tag(f"{repo}:{tag}", "emulation-python3.8", tag="latest") - cls.docker_client.api.tag(f"{repo}:{tag}", "emulation-python3.8-2", tag="latest") + cls.docker_client.api.tag(f"{repo}:{tag}", "emulation-python3.9", tag="latest") + cls.docker_client.api.tag(f"{repo}:{tag}", "emulation-python3.9-2", tag="latest") cls.docker_client.api.tag(f"{repo}:{tag}", "colorsrandomfunctionf61b9209", tag="latest") super(TestPackageImage, cls).setUpClass() @@ -264,8 +264,8 @@ def test_package_with_deep_nested_template_image(self): # verify all function images are pushed images = [ - ("emulation-python3.8", "latest"), - ("emulation-python3.8-2", "latest"), + ("emulation-python3.9", "latest"), + ("emulation-python3.9-2", "latest"), ] for image, tag in images: # check string like this: diff --git a/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/child-pass-down.yaml b/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/child-pass-down.yaml index 8aa5ce4eb0..11f287b31e 100644 --- a/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/child-pass-down.yaml +++ b/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/child-pass-down.yaml @@ -11,6 +11,6 @@ Resources: Properties: CodeUri: ../Python Handler: main.handler - Runtime: python3.8 + Runtime: python3.9 Layers: - !Ref Layer diff --git a/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/child-pass-up.yaml b/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/child-pass-up.yaml index 86029d2e8d..a3b028b55f 100644 --- a/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/child-pass-up.yaml +++ b/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/child-pass-up.yaml @@ -8,9 +8,9 @@ Resources: LayerName: MyLayerInChild ContentUri: ../PyLayer CompatibleRuntimes: - - python3.8 + - python3.9 Metadata: - BuildMethod: python3.8 + BuildMethod: python3.9 Outputs: LayerVersion: diff --git a/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/template-pass-down.yaml b/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/template-pass-down.yaml index ce6ea5decc..522563a84d 100644 --- a/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/template-pass-down.yaml +++ b/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/template-pass-down.yaml @@ -8,9 +8,9 @@ Resources: LayerName: MyLayerInRoot ContentUri: ../PyLayer CompatibleRuntimes: - - python3.8 + - python3.9 Metadata: - BuildMethod: python3.8 + BuildMethod: python3.9 AppUsingRef: Type: AWS::Serverless::Application diff --git a/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/template-pass-up.yaml b/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/template-pass-up.yaml index cb02f8ceff..aa0f9efa31 100644 --- a/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/template-pass-up.yaml +++ b/tests/integration/testdata/buildcmd/nested-with-intrinsic-functions/template-pass-up.yaml @@ -12,6 +12,6 @@ Resources: Properties: CodeUri: ../Python Handler: main.handler - Runtime: python3.8 + Runtime: python3.9 Layers: - !GetAtt ChildApp.Outputs.LayerVersion \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/template-with-s3-code.yaml b/tests/integration/testdata/buildcmd/template-with-s3-code.yaml index 21e6f51fe7..7fb4ee2fc9 100644 --- a/tests/integration/testdata/buildcmd/template-with-s3-code.yaml +++ b/tests/integration/testdata/buildcmd/template-with-s3-code.yaml @@ -7,7 +7,7 @@ Resources: Type: AWS::Serverless::Function Properties: Handler: app.handler - Runtime: python3.8 + Runtime: python3.9 CodeUri: s3://some/path Timeout: 600 @@ -15,7 +15,7 @@ Resources: Type: AWS::Serverless::Function Properties: Handler: app.handler - Runtime: python3.8 + Runtime: python3.9 CodeUri: Bucket: some-bucket Key: some-key @@ -25,7 +25,7 @@ Resources: Type: AWS::Lambda::Function Properties: Handler: app.handler - Runtime: python3.8 + Runtime: python3.9 Code: s3://some/path Timeout: 600 @@ -33,7 +33,7 @@ Resources: Type: AWS::Lambda::Function Properties: Handler: app.handler - Runtime: python3.8 + Runtime: python3.9 Code: S3Bucket: some-bucket S3Key: some-key @@ -44,7 +44,7 @@ Resources: Properties: ContentUri: s3://some/path CompatibleRuntimes: - - python3.8 + - python3.9 IgnoreServerlessLayer2: Type: AWS::Serverless::LayerVersion @@ -53,14 +53,14 @@ Resources: Bucket: some-bucket Key: some-key CompatibleRuntimes: - - python3.8 + - python3.9 IgnoreLambdaLayer: Type: AWS::Lambda::LayerVersion Properties: Content: s3://some/path CompatibleRuntimes: - - python3.8 + - python3.9 IgnoreLambdaLayer2: Type: AWS::Lambda::LayerVersion @@ -69,14 +69,14 @@ Resources: S3Bucket: some-bucket S3Key: some-key CompatibleRuntimes: - - python3.8 + - python3.9 # the two functions below should still be built even all layers are not available ServerlessFunction: Type: AWS::Serverless::Function Properties: Handler: main.handler - Runtime: python3.8 + Runtime: python3.9 CodeUri: Python Timeout: 600 Layers: @@ -89,7 +89,7 @@ Resources: Type: AWS::Lambda::Function Properties: Handler: main.handler - Runtime: python3.8 + Runtime: python3.9 Code: Python Timeout: 600 Layers: diff --git a/tests/integration/testdata/buildcmd/template-with-zip-code.yaml b/tests/integration/testdata/buildcmd/template-with-zip-code.yaml index d3aad66864..53dd486d3c 100644 --- a/tests/integration/testdata/buildcmd/template-with-zip-code.yaml +++ b/tests/integration/testdata/buildcmd/template-with-zip-code.yaml @@ -7,7 +7,7 @@ Resources: Type: AWS::Serverless::Function Properties: Handler: app.handler - Runtime: python3.8 + Runtime: python3.9 CodeUri: /some/path/file.zip Timeout: 600 @@ -15,7 +15,7 @@ Resources: Type: AWS::Lambda::Function Properties: Handler: app.handler - Runtime: python3.8 + Runtime: python3.9 Code: some/path/file.zip Timeout: 600 @@ -24,11 +24,11 @@ Resources: Properties: ContentUri: ./some.zip CompatibleRuntimes: - - python3.8 + - python3.9 IgnoreLambdaLayer: Type: AWS::Lambda::LayerVersion Properties: Content: some.zip CompatibleRuntimes: - - python3.8 \ No newline at end of file + - python3.9 \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/modules/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/modules/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/modules/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/modules/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/modules/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/modules/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/modules/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/modules/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/root_module/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/root_module/main.tf index 75b47692f2..ca87fbc4bf 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/root_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory/root_module/main.tf @@ -61,7 +61,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -96,7 +96,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -174,8 +174,8 @@ module "layer7" { version = "4.6.0" create_layer = true layer_name = "lambda_layer7" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" source_path = { path = local.layer1_src_path prefix_in_zip = "python" @@ -190,6 +190,6 @@ module "function7" { source_path = local.hello_world_function_src_path function_name = "function7" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer7.lambda_layer_arn] } \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/modules/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/modules/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/modules/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/modules/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/modules/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/modules/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/modules/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/modules/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/root_module/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/root_module/main.tf index 29f6f21622..8b965de903 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/root_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows/root_module/main.tf @@ -61,7 +61,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -96,7 +96,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" timeout = 300 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/modules/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/modules/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/modules/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/modules/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/modules/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/modules/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/modules/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/modules/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/root_module/main.tf b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/root_module/main.tf index a066ba51f0..3b49e4d5ee 100644 --- a/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/root_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/application_outside_root_directory_windows_container/root_module/main.tf @@ -61,7 +61,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -96,7 +96,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" timeout = 300 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/buildcmd/terraform/broken_tf/main.tf b/tests/integration/testdata/buildcmd/terraform/broken_tf/main.tf index 9ef87d3ba7..22c1aa333b 100644 --- a/tests/integration/testdata/buildcmd/terraform/broken_tf/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/broken_tf/main.tf @@ -35,7 +35,7 @@ resource "aws_lambda_function" "s3_lambda" { s3_bucket = "lambda_code_bucket" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "s3_lambda_function" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile b/tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile index cf075919d7..1d78793731 100644 --- a/tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile +++ b/tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile @@ -15,11 +15,11 @@ RUN yum install -y yum-utils \ && terraform --version # AWS Lambda Builders -RUN amazon-linux-extras enable python3.8 -RUN yum clean metadata && yum -y install python3.8 -RUN curl -L get-pip.io | python3.8 +RUN amazon-linux-extras enable python3.9 +RUN yum clean metadata && yum -y install python3.9 +RUN curl -L get-pip.io | python3.9 RUN pip3 install aws-lambda-builders -RUN ln -s /usr/bin/python3.8 /usr/bin/python3 +RUN ln -s /usr/bin/python3.9 /usr/bin/python3 RUN python3 --version VOLUME /project diff --git a/tests/integration/testdata/buildcmd/terraform/invalid_no_local_code_project/main.tf b/tests/integration/testdata/buildcmd/terraform/invalid_no_local_code_project/main.tf index c9c92585f3..9566860465 100644 --- a/tests/integration/testdata/buildcmd/terraform/invalid_no_local_code_project/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/invalid_no_local_code_project/main.tf @@ -34,7 +34,7 @@ resource "aws_lambda_function" "function" { s3_bucket = aws_s3_bucket.lambda_functions_code_bucket.id s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "s3_lambda_function" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/buildcmd/terraform/simple_application/main.tf b/tests/integration/testdata/buildcmd/terraform/simple_application/main.tf index ba3a1347d8..40c3f87f24 100644 --- a/tests/integration/testdata/buildcmd/terraform/simple_application/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/simple_application/main.tf @@ -35,7 +35,7 @@ resource "aws_lambda_function" "s3_lambda" { s3_bucket = "lambda_code_bucket" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "s3_lambda_function" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/buildcmd/terraform/unsupported/conditional_layers/main.tf b/tests/integration/testdata/buildcmd/terraform/unsupported/conditional_layers/main.tf index 3ed7124821..51fe1a0540 100644 --- a/tests/integration/testdata/buildcmd/terraform/unsupported/conditional_layers/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/unsupported/conditional_layers/main.tf @@ -54,7 +54,7 @@ resource "aws_lambda_function" "function1" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.lambda_function_code.key handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = "${var.namespace}-function1-${random_uuid.s3_bucket.result}" role = aws_iam_role.iam_for_lambda.arn @@ -67,6 +67,6 @@ resource "aws_lambda_layer_version" "layer1" { count = 2 filename = "${local.src_path}/${local.layer1_artifact_filename}" layer_name = "${var.namespace}_lambda_layer1" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } ## */ \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/terraform/unsupported/conditional_layers_null/main.tf b/tests/integration/testdata/buildcmd/terraform/unsupported/conditional_layers_null/main.tf index 892e484806..b93a12c7f9 100644 --- a/tests/integration/testdata/buildcmd/terraform/unsupported/conditional_layers_null/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/unsupported/conditional_layers_null/main.tf @@ -54,7 +54,7 @@ resource "aws_lambda_function" "function1" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.lambda_function_code.key handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = "${var.namespace}-function1-${random_uuid.s3_bucket.result}" role = aws_iam_role.iam_for_lambda.arn @@ -67,6 +67,6 @@ resource "aws_lambda_layer_version" "layer1" { count = 2 filename = "${local.src_path}/${local.layer1_artifact_filename}" layer_name = "${var.namespace}_lambda_layer1" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } ## */ \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/terraform/unsupported/lambda_function_referencing_local_var_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/unsupported/lambda_function_referencing_local_var_layer/main.tf index d4bfd64184..0304bbc216 100644 --- a/tests/integration/testdata/buildcmd/terraform/unsupported/lambda_function_referencing_local_var_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/unsupported/lambda_function_referencing_local_var_layer/main.tf @@ -55,7 +55,7 @@ resource "aws_lambda_function" "function1" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.lambda_function_code.key handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "${var.namespace}-function1-${random_uuid.s3_bucket.result}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -69,6 +69,6 @@ resource "aws_lambda_function" "function1" { resource "aws_lambda_layer_version" "layer1" { filename = "${local.src_path}/${local.layer1_artifact_filename}" layer_name = "${var.namespace}_lambda_layer1" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } ## */ \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/terraform/unsupported/lambda_function_with_count_and_invalid_sam_metadata/main.tf b/tests/integration/testdata/buildcmd/terraform/unsupported/lambda_function_with_count_and_invalid_sam_metadata/main.tf index 260209e6a7..db531a44db 100644 --- a/tests/integration/testdata/buildcmd/terraform/unsupported/lambda_function_with_count_and_invalid_sam_metadata/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/unsupported/lambda_function_with_count_and_invalid_sam_metadata/main.tf @@ -83,7 +83,7 @@ resource "aws_lambda_function" "function1" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.lambda_function_code.key handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "${var.namespace}-function1-${random_uuid.s3_bucket.result}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -123,7 +123,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_filename}" layer_name = "${var.namespace}_lambda_layer1" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] diff --git a/tests/integration/testdata/buildcmd/terraform/unsupported/one_lambda_function_linked_to_two_layers/main.tf b/tests/integration/testdata/buildcmd/terraform/unsupported/one_lambda_function_linked_to_two_layers/main.tf index 9dbc9ee1f8..bfd549e229 100644 --- a/tests/integration/testdata/buildcmd/terraform/unsupported/one_lambda_function_linked_to_two_layers/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/unsupported/one_lambda_function_linked_to_two_layers/main.tf @@ -54,7 +54,7 @@ resource "aws_lambda_function" "function1" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.lambda_function_code.key handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "${var.namespace}-function1-${random_uuid.s3_bucket.result}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -70,7 +70,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.src_path}/${local.layer1_artifact_filename}" layer_name = "${var.namespace}_lambda_layer1" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } ## */ @@ -80,7 +80,7 @@ resource "aws_lambda_layer_version" "layer2" { count = 1 filename = "${local.src_path}/${local.layer2_artifact_filename}" layer_name = "${var.namespace}_lambda_layer2" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } ## */ \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/expected.template.yaml index 47e7837224..114b8aab98 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/expected.template.yaml +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/expected.template.yaml @@ -7,7 +7,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -24,7 +24,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -41,7 +41,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -60,7 +60,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -79,7 +79,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -98,7 +98,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -117,7 +117,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -134,7 +134,6 @@ Resources: Properties: LayerName: my_layer CompatibleRuntimes: - - python3.8 - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/my_layer_code Metadata: @@ -149,7 +148,7 @@ Resources: Properties: LayerName: lambda_layer1 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer1 Metadata: SamResourceId: aws_lambda_layer_version.layer1[0] @@ -163,7 +162,7 @@ Resources: Properties: LayerName: lambda_layer3 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer3 Metadata: SamResourceId: aws_lambda_layer_version.layer3["my_idx"] @@ -177,7 +176,7 @@ Resources: Properties: LayerName: lambda_layer4 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer4 Metadata: SamResourceId: aws_lambda_layer_version.layer4 @@ -191,7 +190,7 @@ Resources: Properties: LayerName: lambda_layer5 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer5 Metadata: SamResourceId: aws_lambda_layer_version.layer5 @@ -205,7 +204,7 @@ Resources: Properties: LayerName: lambda_layer6 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer6 Metadata: SamResourceId: aws_lambda_layer_version.layer6 @@ -221,7 +220,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -240,7 +239,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -259,7 +258,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -278,7 +277,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -297,7 +296,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -316,7 +315,7 @@ Resources: Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -333,7 +332,7 @@ Resources: Properties: LayerName: lambda_layer10 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer10 Metadata: SamResourceId: module.layer10.aws_lambda_layer_version.this[0] @@ -347,7 +346,7 @@ Resources: Properties: LayerName: lambda_layer11 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer11 Metadata: SamResourceId: module.layer11.aws_lambda_layer_version.this[0] @@ -361,7 +360,7 @@ Resources: Properties: LayerName: lambda_layer2 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer2 Metadata: SamResourceId: module.layer2.aws_lambda_layer_version.layer @@ -375,7 +374,7 @@ Resources: Properties: LayerName: lambda_layer7 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer7 Metadata: SamResourceId: module.layer7.aws_lambda_layer_version.this[0] @@ -389,7 +388,7 @@ Resources: Properties: LayerName: lambda_layer8 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer8 Metadata: SamResourceId: module.layer8.aws_lambda_layer_version.this[0] @@ -403,7 +402,7 @@ Resources: Properties: LayerName: lambda_layer9 CompatibleRuntimes: - - python3.8 + - python3.9 Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 Metadata: BuildMethod: makefile @@ -419,7 +418,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -436,7 +435,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_tf_module/main.tf index b861ce460a..fc2a406f9e 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_tf_module/main.tf @@ -46,7 +46,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_tf_module/nested_lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_tf_module/nested_lambda_tf_module/main.tf index cb6b91e32e..9fc4b652f3 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_tf_module/nested_lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/lambda_tf_module/nested_lambda_tf_module/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/main.tf index 7f8720182e..f8ba77c61f 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/main.tf @@ -95,7 +95,7 @@ resource "null_resource" "build_layer_version" { resource "aws_lambda_function" "from_localfile" { filename = "${local.building_path}/${local.lambda_code_filename}" handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = "my_function_from_localfile" role = aws_iam_role.iam_for_lambda.arn @@ -122,7 +122,7 @@ resource "aws_lambda_function" "from_s3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.s3_lambda_code.key handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = "my_function_from_s3" role = aws_iam_role.iam_for_lambda.arn @@ -188,7 +188,7 @@ resource "aws_lambda_layer_version" "from_local" { filename = "${local.building_path}/${local.layer_code_filename}" layer_name = "my_layer" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } resource "null_resource" "sam_metadata_aws_lambda_layer_version_from_local" { @@ -247,7 +247,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -330,7 +330,7 @@ resource "aws_lambda_layer_version" "layer3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "layer3_code" layer_name = each.value - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer3_version, aws_s3_object.layer3_code ] @@ -374,7 +374,7 @@ resource "aws_lambda_layer_version" "layer4" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer4_code" layer_name = "lambda_layer4" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer4_version, aws_s3_object.layer4_code ] @@ -416,7 +416,7 @@ resource "aws_lambda_layer_version" "layer5" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer5_code" layer_name = "lambda_layer5" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer5_version, aws_s3_object.layer5_code ] @@ -448,7 +448,7 @@ resource "null_resource" "sam_metadata_aws_lambda_layer_version_layer6" { resource "aws_lambda_layer_version" "layer6" { filename = "${local.building_path}/${local.layer6_artifact_file_name}" layer_name = "lambda_layer6" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer6_version ] @@ -472,7 +472,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -535,7 +535,7 @@ resource "aws_lambda_function" "function3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "function3_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function3" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -574,7 +574,7 @@ resource "aws_lambda_function" "function4" { s3_bucket = "existing_s3_bucket_name" s3_key = "function4_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function4" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -612,7 +612,7 @@ resource "aws_lambda_function" "function5" { s3_bucket = "existing_s3_bucket_name" s3_key = "function5_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function5" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -641,7 +641,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function6" { resource "aws_lambda_function" "function6" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function6" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -660,8 +660,8 @@ module "layer7" { version = "4.6.0" create_layer = true layer_name = "lambda_layer7" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" source_path = { path = local.layer7_src_path prefix_in_zip = "python" @@ -676,7 +676,7 @@ module "function7" { source_path = local.hello_world_function_src_path function_name = "function7" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer7.lambda_layer_arn] } @@ -685,8 +685,8 @@ module "layer8" { version = "4.6.0" create_layer = true layer_name = "lambda_layer8" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" store_on_s3 = true s3_bucket = "existing_s3_bucket" source_path = { @@ -703,7 +703,7 @@ module "function8" { function_name = "function8" timeout = 300 handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer8.lambda_layer_arn] store_on_s3 = true s3_bucket = "existing_s3_bucket" @@ -738,8 +738,8 @@ module "layer9" { create_layer = true create_package = false layer_name = "lambda_layer9" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" s3_bucket = "existing_s3_bucket" local_existing_package = "${local.building_path}/${local.layer9_artifact_file_name}" } @@ -767,7 +767,7 @@ module "function9" { timeout = 300 function_name = "function9" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer9.lambda_layer_arn] } ## /* function9 connected to layer9 @@ -778,8 +778,8 @@ module "layer10" { version = "4.6.0" create_layer = true layer_name = "lambda_layer10" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" store_on_s3 = true s3_bucket = aws_s3_bucket.lambda_code_bucket.id source_path = { @@ -796,7 +796,7 @@ module "function10" { function_name = "function10" timeout = 300 handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer10.lambda_layer_arn] store_on_s3 = true s3_bucket = aws_s3_bucket.lambda_code_bucket.id @@ -807,8 +807,8 @@ module "layer11" { version = "4.6.0" create_layer = true layer_name = "lambda_layer11" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" source_path = [{ path = local.layer11_src_path prefix_in_zip = "python" @@ -825,6 +825,6 @@ module "function11" { }] function_name = "function11" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer11.lambda_layer_arn] } diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/expected.template.yaml index 74aeb28fb1..b985f6b43a 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/expected.template.yaml +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/expected.template.yaml @@ -7,7 +7,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -24,7 +24,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -41,7 +41,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -60,7 +60,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -79,7 +79,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -98,7 +98,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -117,7 +117,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -134,7 +134,7 @@ Resources: Properties: LayerName: my_layer CompatibleRuntimes: - - python3.8 + - python3.9 - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/my_layer_code Metadata: @@ -149,7 +149,7 @@ Resources: Properties: LayerName: lambda_layer1 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer1 Metadata: SamResourceId: aws_lambda_layer_version.layer1[0] @@ -163,7 +163,7 @@ Resources: Properties: LayerName: lambda_layer3 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer3 Metadata: SamResourceId: aws_lambda_layer_version.layer3["my_idx"] @@ -177,7 +177,7 @@ Resources: Properties: LayerName: lambda_layer4 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer4 Metadata: SamResourceId: aws_lambda_layer_version.layer4 @@ -191,7 +191,7 @@ Resources: Properties: LayerName: lambda_layer5 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer5 Metadata: SamResourceId: aws_lambda_layer_version.layer5 @@ -205,7 +205,7 @@ Resources: Properties: LayerName: lambda_layer6 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer6 Metadata: SamResourceId: aws_lambda_layer_version.layer6 @@ -221,7 +221,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -240,7 +240,7 @@ Resources: Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -257,7 +257,7 @@ Resources: Properties: LayerName: lambda_layer2 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer2 Metadata: SamResourceId: module.layer2.aws_lambda_layer_version.layer @@ -271,7 +271,7 @@ Resources: Properties: LayerName: lambda_layer9 CompatibleRuntimes: - - python3.8 + - python3.9 Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 Metadata: BuildMethod: makefile @@ -287,7 +287,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -304,7 +304,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_tf_module/main.tf index b861ce460a..fc2a406f9e 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_tf_module/main.tf @@ -46,7 +46,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_tf_module/nested_lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_tf_module/nested_lambda_tf_module/main.tf index cb6b91e32e..9fc4b652f3 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_tf_module/nested_lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/lambda_tf_module/nested_lambda_tf_module/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/main.tf index d8c88fa6df..dfc9cf4b21 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/main.tf @@ -94,7 +94,7 @@ resource "null_resource" "build_layer_version" { resource "aws_lambda_function" "from_localfile" { filename = "${local.building_path}/${local.lambda_code_filename}" handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = "my_function_from_localfile" role = aws_iam_role.iam_for_lambda.arn @@ -121,7 +121,7 @@ resource "aws_lambda_function" "from_s3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.s3_lambda_code.key handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = "my_function_from_s3" role = aws_iam_role.iam_for_lambda.arn @@ -187,7 +187,7 @@ resource "aws_lambda_layer_version" "from_local" { filename = "${local.building_path}/${local.layer_code_filename}" layer_name = "my_layer" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } resource "null_resource" "sam_metadata_aws_lambda_layer_version_from_local" { @@ -246,7 +246,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -329,7 +329,7 @@ resource "aws_lambda_layer_version" "layer3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "layer3_code" layer_name = each.value - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer3_version, aws_s3_object.layer3_code ] @@ -373,7 +373,7 @@ resource "aws_lambda_layer_version" "layer4" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer4_code" layer_name = "lambda_layer4" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer4_version, aws_s3_object.layer4_code ] @@ -415,7 +415,7 @@ resource "aws_lambda_layer_version" "layer5" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer5_code" layer_name = "lambda_layer5" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer5_version, aws_s3_object.layer5_code ] @@ -447,7 +447,7 @@ resource "null_resource" "sam_metadata_aws_lambda_layer_version_layer6" { resource "aws_lambda_layer_version" "layer6" { filename = "${local.building_path}/${local.layer6_artifact_file_name}" layer_name = "lambda_layer6" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer6_version ] @@ -471,7 +471,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -534,7 +534,7 @@ resource "aws_lambda_function" "function3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "function3_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function3" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -573,7 +573,7 @@ resource "aws_lambda_function" "function4" { s3_bucket = "existing_s3_bucket_name" s3_key = "function4_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function4" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -611,7 +611,7 @@ resource "aws_lambda_function" "function5" { s3_bucket = "existing_s3_bucket_name" s3_key = "function5_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function5" timeout = 300 role = aws_iam_role.iam_for_lambda.arn @@ -640,7 +640,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function6" { resource "aws_lambda_function" "function6" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function6" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -682,8 +682,8 @@ module "layer9" { create_layer = true create_package = false layer_name = "lambda_layer9" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" s3_bucket = "existing_s3_bucket" local_existing_package = "${local.building_path}/${local.layer9_artifact_file_name}" } @@ -711,7 +711,7 @@ module "function9" { timeout = 300 function_name = "function9" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer9.lambda_layer_arn] } ## /* function9 connected to layer9 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/expected.template.yaml index 74aeb28fb1..b985f6b43a 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/expected.template.yaml +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/expected.template.yaml @@ -7,7 +7,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -24,7 +24,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -41,7 +41,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -60,7 +60,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -79,7 +79,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -98,7 +98,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -117,7 +117,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -134,7 +134,7 @@ Resources: Properties: LayerName: my_layer CompatibleRuntimes: - - python3.8 + - python3.9 - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/my_layer_code Metadata: @@ -149,7 +149,7 @@ Resources: Properties: LayerName: lambda_layer1 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer1 Metadata: SamResourceId: aws_lambda_layer_version.layer1[0] @@ -163,7 +163,7 @@ Resources: Properties: LayerName: lambda_layer3 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer3 Metadata: SamResourceId: aws_lambda_layer_version.layer3["my_idx"] @@ -177,7 +177,7 @@ Resources: Properties: LayerName: lambda_layer4 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer4 Metadata: SamResourceId: aws_lambda_layer_version.layer4 @@ -191,7 +191,7 @@ Resources: Properties: LayerName: lambda_layer5 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer5 Metadata: SamResourceId: aws_lambda_layer_version.layer5 @@ -205,7 +205,7 @@ Resources: Properties: LayerName: lambda_layer6 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer6 Metadata: SamResourceId: aws_lambda_layer_version.layer6 @@ -221,7 +221,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -240,7 +240,7 @@ Resources: Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -257,7 +257,7 @@ Resources: Properties: LayerName: lambda_layer2 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer2 Metadata: SamResourceId: module.layer2.aws_lambda_layer_version.layer @@ -271,7 +271,7 @@ Resources: Properties: LayerName: lambda_layer9 CompatibleRuntimes: - - python3.8 + - python3.9 Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 Metadata: BuildMethod: makefile @@ -287,7 +287,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -304,7 +304,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_tf_module/main.tf index b861ce460a..fc2a406f9e 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_tf_module/main.tf @@ -46,7 +46,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_tf_module/nested_lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_tf_module/nested_lambda_tf_module/main.tf index cb6b91e32e..9fc4b652f3 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_tf_module/nested_lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/lambda_tf_module/nested_lambda_tf_module/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/main.tf index 2249879cb4..9753ed8733 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/main.tf @@ -94,7 +94,7 @@ resource "null_resource" "build_layer_version" { resource "aws_lambda_function" "from_localfile" { filename = "${local.building_path}/${local.lambda_code_filename}" handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "my_function_from_localfile" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -121,7 +121,7 @@ resource "aws_lambda_function" "from_s3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.s3_lambda_code.key handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "my_function_from_s3" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -187,7 +187,7 @@ resource "aws_lambda_layer_version" "from_local" { filename = "${local.building_path}/${local.layer_code_filename}" layer_name = "my_layer" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } resource "null_resource" "sam_metadata_aws_lambda_layer_version_from_local" { @@ -246,7 +246,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -329,7 +329,7 @@ resource "aws_lambda_layer_version" "layer3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "layer3_code" layer_name = each.value - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer3_version, aws_s3_object.layer3_code ] @@ -373,7 +373,7 @@ resource "aws_lambda_layer_version" "layer4" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer4_code" layer_name = "lambda_layer4" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer4_version, aws_s3_object.layer4_code ] @@ -415,7 +415,7 @@ resource "aws_lambda_layer_version" "layer5" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer5_code" layer_name = "lambda_layer5" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer5_version, aws_s3_object.layer5_code ] @@ -447,7 +447,7 @@ resource "null_resource" "sam_metadata_aws_lambda_layer_version_layer6" { resource "aws_lambda_layer_version" "layer6" { filename = "${local.building_path}/${local.layer6_artifact_file_name}" layer_name = "lambda_layer6" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer6_version ] @@ -471,7 +471,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -534,7 +534,7 @@ resource "aws_lambda_function" "function3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "function3_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function3" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -573,7 +573,7 @@ resource "aws_lambda_function" "function4" { s3_bucket = "existing_s3_bucket_name" s3_key = "function4_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function4" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -611,7 +611,7 @@ resource "aws_lambda_function" "function5" { s3_bucket = "existing_s3_bucket_name" s3_key = "function5_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function5" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -640,7 +640,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function6" { resource "aws_lambda_function" "function6" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function6" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -682,8 +682,8 @@ module "layer9" { create_layer = true create_package = false layer_name = "lambda_layer9" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" s3_bucket = "existing_s3_bucket" local_existing_package = "${local.building_path}/${local.layer9_artifact_file_name}" } @@ -711,7 +711,7 @@ module "function9" { timeout = 300 function_name = "function9" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer9.lambda_layer_arn] } ## /* function9 connected to layer9 \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/expected.template.yaml index 47e7837224..2ec58d8e73 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/expected.template.yaml +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/expected.template.yaml @@ -7,7 +7,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -24,7 +24,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -41,7 +41,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -60,7 +60,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -79,7 +79,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -98,7 +98,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -117,7 +117,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -134,7 +134,7 @@ Resources: Properties: LayerName: my_layer CompatibleRuntimes: - - python3.8 + - python3.9 - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/my_layer_code Metadata: @@ -149,7 +149,7 @@ Resources: Properties: LayerName: lambda_layer1 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer1 Metadata: SamResourceId: aws_lambda_layer_version.layer1[0] @@ -163,7 +163,7 @@ Resources: Properties: LayerName: lambda_layer3 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer3 Metadata: SamResourceId: aws_lambda_layer_version.layer3["my_idx"] @@ -177,7 +177,7 @@ Resources: Properties: LayerName: lambda_layer4 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer4 Metadata: SamResourceId: aws_lambda_layer_version.layer4 @@ -191,7 +191,7 @@ Resources: Properties: LayerName: lambda_layer5 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer5 Metadata: SamResourceId: aws_lambda_layer_version.layer5 @@ -205,7 +205,7 @@ Resources: Properties: LayerName: lambda_layer6 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer6 Metadata: SamResourceId: aws_lambda_layer_version.layer6 @@ -221,7 +221,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -240,7 +240,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -259,7 +259,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -278,7 +278,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -297,7 +297,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -316,7 +316,7 @@ Resources: Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -333,7 +333,7 @@ Resources: Properties: LayerName: lambda_layer10 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer10 Metadata: SamResourceId: module.layer10.aws_lambda_layer_version.this[0] @@ -347,7 +347,7 @@ Resources: Properties: LayerName: lambda_layer11 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer11 Metadata: SamResourceId: module.layer11.aws_lambda_layer_version.this[0] @@ -361,7 +361,7 @@ Resources: Properties: LayerName: lambda_layer2 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer2 Metadata: SamResourceId: module.layer2.aws_lambda_layer_version.layer @@ -375,7 +375,7 @@ Resources: Properties: LayerName: lambda_layer7 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer7 Metadata: SamResourceId: module.layer7.aws_lambda_layer_version.this[0] @@ -389,7 +389,7 @@ Resources: Properties: LayerName: lambda_layer8 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer8 Metadata: SamResourceId: module.layer8.aws_lambda_layer_version.this[0] @@ -403,7 +403,7 @@ Resources: Properties: LayerName: lambda_layer9 CompatibleRuntimes: - - python3.8 + - python3.9 Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 Metadata: BuildMethod: makefile @@ -419,7 +419,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -436,7 +436,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_tf_module/main.tf index b861ce460a..fc2a406f9e 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_tf_module/main.tf @@ -46,7 +46,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_tf_module/nested_lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_tf_module/nested_lambda_tf_module/main.tf index cb6b91e32e..9fc4b652f3 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_tf_module/nested_lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/lambda_tf_module/nested_lambda_tf_module/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/main.tf index a9c9ed722a..99881f0e4a 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/main.tf @@ -99,7 +99,7 @@ resource "null_resource" "build_layer_version" { resource "aws_lambda_function" "from_localfile" { filename = "${local.building_path}/${local.lambda_code_filename}" handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "my_function_from_localfile" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -126,7 +126,7 @@ resource "aws_lambda_function" "from_s3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.s3_lambda_code.key handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "my_function_from_s3" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -192,7 +192,7 @@ resource "aws_lambda_layer_version" "from_local" { filename = "${local.building_path}/${local.layer_code_filename}" layer_name = "my_layer" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } resource "null_resource" "sam_metadata_aws_lambda_layer_version_from_local" { @@ -251,7 +251,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -334,7 +334,7 @@ resource "aws_lambda_layer_version" "layer3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "layer3_code" layer_name = each.value - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer3_version, aws_s3_object.layer3_code ] @@ -378,7 +378,7 @@ resource "aws_lambda_layer_version" "layer4" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer4_code" layer_name = "lambda_layer4" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer4_version, aws_s3_object.layer4_code ] @@ -420,7 +420,7 @@ resource "aws_lambda_layer_version" "layer5" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer5_code" layer_name = "lambda_layer5" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer5_version, aws_s3_object.layer5_code ] @@ -452,7 +452,7 @@ resource "null_resource" "sam_metadata_aws_lambda_layer_version_layer6" { resource "aws_lambda_layer_version" "layer6" { filename = "${local.building_path}/${local.layer6_artifact_file_name}" layer_name = "lambda_layer6" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer6_version ] @@ -476,7 +476,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -539,7 +539,7 @@ resource "aws_lambda_function" "function3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "function3_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function3" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -578,7 +578,7 @@ resource "aws_lambda_function" "function4" { s3_bucket = "existing_s3_bucket_name" s3_key = "function4_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function4" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -616,7 +616,7 @@ resource "aws_lambda_function" "function5" { s3_bucket = "existing_s3_bucket_name" s3_key = "function5_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function5" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -645,7 +645,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function6" { resource "aws_lambda_function" "function6" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function6" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -664,8 +664,8 @@ module "layer7" { version = "4.6.0" create_layer = true layer_name = "lambda_layer7" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" source_path = { path = local.layer7_src_path prefix_in_zip = "python" @@ -680,7 +680,7 @@ module "function7" { function_name = "function7" timeout = 300 handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer7.lambda_layer_arn] } @@ -689,8 +689,8 @@ module "layer8" { version = "4.6.0" create_layer = true layer_name = "lambda_layer8" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" store_on_s3 = true s3_bucket = "existing_s3_bucket" source_path = { @@ -707,7 +707,7 @@ module "function8" { function_name = "function8" timeout = 300 handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer8.lambda_layer_arn] store_on_s3 = true s3_bucket = "existing_s3_bucket" @@ -742,8 +742,8 @@ module "layer9" { create_layer = true create_package = false layer_name = "lambda_layer9" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" s3_bucket = "existing_s3_bucket" local_existing_package = "${local.building_path}/${local.layer9_artifact_file_name}" } @@ -771,7 +771,7 @@ module "function9" { timeout = 300 function_name = "function9" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer9.lambda_layer_arn] } ## /* function9 connected to layer9 @@ -782,8 +782,8 @@ module "layer10" { version = "4.6.0" create_layer = true layer_name = "lambda_layer10" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" store_on_s3 = true s3_bucket = aws_s3_bucket.lambda_code_bucket.id source_path = { @@ -800,7 +800,7 @@ module "function10" { function_name = "function10" timeout = 300 handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer10.lambda_layer_arn] store_on_s3 = true s3_bucket = aws_s3_bucket.lambda_code_bucket.id @@ -811,8 +811,8 @@ module "layer11" { version = "4.6.0" create_layer = true layer_name = "lambda_layer11" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" source_path = [{ path = local.layer11_src_path prefix_in_zip = "python" @@ -829,6 +829,6 @@ module "function11" { }] function_name = "function11" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer11.lambda_layer_arn] } diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/expected.template.yaml index 74aeb28fb1..b985f6b43a 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/expected.template.yaml +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/expected.template.yaml @@ -7,7 +7,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -24,7 +24,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -41,7 +41,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -60,7 +60,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -79,7 +79,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -98,7 +98,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -117,7 +117,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -134,7 +134,7 @@ Resources: Properties: LayerName: my_layer CompatibleRuntimes: - - python3.8 + - python3.9 - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/my_layer_code Metadata: @@ -149,7 +149,7 @@ Resources: Properties: LayerName: lambda_layer1 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer1 Metadata: SamResourceId: aws_lambda_layer_version.layer1[0] @@ -163,7 +163,7 @@ Resources: Properties: LayerName: lambda_layer3 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer3 Metadata: SamResourceId: aws_lambda_layer_version.layer3["my_idx"] @@ -177,7 +177,7 @@ Resources: Properties: LayerName: lambda_layer4 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer4 Metadata: SamResourceId: aws_lambda_layer_version.layer4 @@ -191,7 +191,7 @@ Resources: Properties: LayerName: lambda_layer5 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer5 Metadata: SamResourceId: aws_lambda_layer_version.layer5 @@ -205,7 +205,7 @@ Resources: Properties: LayerName: lambda_layer6 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer6 Metadata: SamResourceId: aws_lambda_layer_version.layer6 @@ -221,7 +221,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -240,7 +240,7 @@ Resources: Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -257,7 +257,7 @@ Resources: Properties: LayerName: lambda_layer2 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer2 Metadata: SamResourceId: module.layer2.aws_lambda_layer_version.layer @@ -271,7 +271,7 @@ Resources: Properties: LayerName: lambda_layer9 CompatibleRuntimes: - - python3.8 + - python3.9 Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 Metadata: BuildMethod: makefile @@ -287,7 +287,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -304,7 +304,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_tf_module/main.tf index b861ce460a..fc2a406f9e 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_tf_module/main.tf @@ -46,7 +46,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_tf_module/nested_lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_tf_module/nested_lambda_tf_module/main.tf index cb6b91e32e..9fc4b652f3 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_tf_module/nested_lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/lambda_tf_module/nested_lambda_tf_module/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/main.tf index 53113bd811..a267db8928 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/main.tf @@ -98,7 +98,7 @@ resource "null_resource" "build_layer_version" { resource "aws_lambda_function" "from_localfile" { filename = "${local.building_path}/${local.lambda_code_filename}" handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "my_function_from_localfile" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -125,7 +125,7 @@ resource "aws_lambda_function" "from_s3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.s3_lambda_code.key handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "my_function_from_s3" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -191,7 +191,7 @@ resource "aws_lambda_layer_version" "from_local" { filename = "${local.building_path}/${local.layer_code_filename}" layer_name = "my_layer" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } resource "null_resource" "sam_metadata_aws_lambda_layer_version_from_local" { @@ -250,7 +250,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -333,7 +333,7 @@ resource "aws_lambda_layer_version" "layer3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "layer3_code" layer_name = each.value - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer3_version, aws_s3_object.layer3_code ] @@ -377,7 +377,7 @@ resource "aws_lambda_layer_version" "layer4" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer4_code" layer_name = "lambda_layer4" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer4_version, aws_s3_object.layer4_code ] @@ -419,7 +419,7 @@ resource "aws_lambda_layer_version" "layer5" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer5_code" layer_name = "lambda_layer5" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer5_version, aws_s3_object.layer5_code ] @@ -451,7 +451,7 @@ resource "null_resource" "sam_metadata_aws_lambda_layer_version_layer6" { resource "aws_lambda_layer_version" "layer6" { filename = "${local.building_path}/${local.layer6_artifact_file_name}" layer_name = "lambda_layer6" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer6_version ] @@ -475,7 +475,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -538,7 +538,7 @@ resource "aws_lambda_function" "function3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "function3_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function3" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -577,7 +577,7 @@ resource "aws_lambda_function" "function4" { s3_bucket = "existing_s3_bucket_name" s3_key = "function4_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function4" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -615,7 +615,7 @@ resource "aws_lambda_function" "function5" { s3_bucket = "existing_s3_bucket_name" s3_key = "function5_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function5" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -644,7 +644,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function6" { resource "aws_lambda_function" "function6" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function6" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -686,8 +686,8 @@ module "layer9" { create_layer = true create_package = false layer_name = "lambda_layer9" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" s3_bucket = "existing_s3_bucket" local_existing_package = "${local.building_path}/${local.layer9_artifact_file_name}" } @@ -715,7 +715,7 @@ module "function9" { timeout = 300 function_name = "function9" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer9.lambda_layer_arn] } ## /* function9 connected to layer9 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/expected.template.yaml index 74aeb28fb1..b985f6b43a 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/expected.template.yaml +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/expected.template.yaml @@ -7,7 +7,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -24,7 +24,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -41,7 +41,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -60,7 +60,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -79,7 +79,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -98,7 +98,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -117,7 +117,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -134,7 +134,7 @@ Resources: Properties: LayerName: my_layer CompatibleRuntimes: - - python3.8 + - python3.9 - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/my_layer_code Metadata: @@ -149,7 +149,7 @@ Resources: Properties: LayerName: lambda_layer1 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer1 Metadata: SamResourceId: aws_lambda_layer_version.layer1[0] @@ -163,7 +163,7 @@ Resources: Properties: LayerName: lambda_layer3 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer3 Metadata: SamResourceId: aws_lambda_layer_version.layer3["my_idx"] @@ -177,7 +177,7 @@ Resources: Properties: LayerName: lambda_layer4 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer4 Metadata: SamResourceId: aws_lambda_layer_version.layer4 @@ -191,7 +191,7 @@ Resources: Properties: LayerName: lambda_layer5 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer5 Metadata: SamResourceId: aws_lambda_layer_version.layer5 @@ -205,7 +205,7 @@ Resources: Properties: LayerName: lambda_layer6 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer6 Metadata: SamResourceId: aws_lambda_layer_version.layer6 @@ -221,7 +221,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -240,7 +240,7 @@ Resources: Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC Handler: app.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Layers: @@ -257,7 +257,7 @@ Resources: Properties: LayerName: lambda_layer2 CompatibleRuntimes: - - python3.8 + - python3.9 Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer2 Metadata: SamResourceId: module.layer2.aws_lambda_layer_version.layer @@ -271,7 +271,7 @@ Resources: Properties: LayerName: lambda_layer9 CompatibleRuntimes: - - python3.8 + - python3.9 Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 Metadata: BuildMethod: makefile @@ -287,7 +287,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: @@ -304,7 +304,7 @@ Resources: Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books Handler: index.lambda_handler PackageType: Zip - Runtime: python3.8 + Runtime: python3.9 Timeout: 300 MemorySize: 128 Metadata: diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_function/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_function/main.tf index 0200f69dfe..52baf96f91 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_function/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_function/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn layers = var.layers diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_layer/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_layer/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_tf_module/main.tf index b861ce460a..fc2a406f9e 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_tf_module/main.tf @@ -46,7 +46,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_tf_module/nested_lambda_tf_module/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_tf_module/nested_lambda_tf_module/main.tf index cb6b91e32e..9fc4b652f3 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_tf_module/nested_lambda_tf_module/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/lambda_tf_module/nested_lambda_tf_module/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn timeout = 300 diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/main.tf b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/main.tf index d6ec236a3a..7178e35160 100644 --- a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/main.tf +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/main.tf @@ -98,7 +98,7 @@ resource "null_resource" "build_layer_version" { resource "aws_lambda_function" "from_localfile" { filename = "${local.building_path}/${local.lambda_code_filename}" handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "my_function_from_localfile" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -125,7 +125,7 @@ resource "aws_lambda_function" "from_s3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.bucket s3_key = aws_s3_object.s3_lambda_code.key handler = "index.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "my_function_from_s3" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -191,7 +191,7 @@ resource "aws_lambda_layer_version" "from_local" { filename = "${local.building_path}/${local.layer_code_filename}" layer_name = "my_layer" - compatible_runtimes = ["python3.8", "python3.9"] + compatible_runtimes = ["python3.9"] } resource "null_resource" "sam_metadata_aws_lambda_layer_version_from_local" { @@ -250,7 +250,7 @@ resource "aws_lambda_layer_version" "layer1" { count = 1 filename = "${local.building_path}/${local.layer1_artifact_file_name}" layer_name = "lambda_layer1" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer1_version ] @@ -333,7 +333,7 @@ resource "aws_lambda_layer_version" "layer3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "layer3_code" layer_name = each.value - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer3_version, aws_s3_object.layer3_code ] @@ -377,7 +377,7 @@ resource "aws_lambda_layer_version" "layer4" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer4_code" layer_name = "lambda_layer4" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer4_version, aws_s3_object.layer4_code ] @@ -419,7 +419,7 @@ resource "aws_lambda_layer_version" "layer5" { s3_bucket = "existing_s3_bucket_name" s3_key = "layer5_code" layer_name = "lambda_layer5" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer5_version, aws_s3_object.layer5_code ] @@ -451,7 +451,7 @@ resource "null_resource" "sam_metadata_aws_lambda_layer_version_layer6" { resource "aws_lambda_layer_version" "layer6" { filename = "${local.building_path}/${local.layer6_artifact_file_name}" layer_name = "lambda_layer6" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] depends_on = [ null_resource.build_layer6_version ] @@ -475,7 +475,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function1" { resource "aws_lambda_function" "function1" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -538,7 +538,7 @@ resource "aws_lambda_function" "function3" { s3_bucket = aws_s3_bucket.lambda_code_bucket.id s3_key = "function3_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function3" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -577,7 +577,7 @@ resource "aws_lambda_function" "function4" { s3_bucket = "existing_s3_bucket_name" s3_key = "function4_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function4" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -615,7 +615,7 @@ resource "aws_lambda_function" "function5" { s3_bucket = "existing_s3_bucket_name" s3_key = "function5_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function5" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -644,7 +644,7 @@ resource "null_resource" "sam_metadata_aws_lambda_function6" { resource "aws_lambda_function" "function6" { filename = "${local.building_path}/${local.hello_world_artifact_file_name}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function6" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -686,8 +686,8 @@ module "layer9" { create_layer = true create_package = false layer_name = "lambda_layer9" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" s3_bucket = "existing_s3_bucket" local_existing_package = "${local.building_path}/${local.layer9_artifact_file_name}" } @@ -714,7 +714,7 @@ module "function9" { create_package = false function_name = "function9" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 layers = [module.layer9.lambda_layer_arn] } diff --git a/tests/integration/testdata/delete/companion-ecr/hello_world/Dockerfile b/tests/integration/testdata/delete/companion-ecr/hello_world/Dockerfile index 7e1397a14b..9cc41f2fb4 100644 --- a/tests/integration/testdata/delete/companion-ecr/hello_world/Dockerfile +++ b/tests/integration/testdata/delete/companion-ecr/hello_world/Dockerfile @@ -1,7 +1,7 @@ -FROM public.ecr.aws/lambda/python:3.8 +FROM public.ecr.aws/lambda/python:3.9 COPY requirements.txt ./ -RUN python3.8 -m pip install -r requirements.txt -t . +RUN python3.9 -m pip install -r requirements.txt -t . COPY app.py ./ diff --git a/tests/integration/testdata/delete/companion-ecr/template.yaml b/tests/integration/testdata/delete/companion-ecr/template.yaml index 590b3ec8db..51d00b9fae 100644 --- a/tests/integration/testdata/delete/companion-ecr/template.yaml +++ b/tests/integration/testdata/delete/companion-ecr/template.yaml @@ -11,4 +11,4 @@ Resources: Metadata: Dockerfile: Dockerfile DockerContext: ./hello_world - DockerTag: python3.8-v1 + DockerTag: python3.9-v1 diff --git a/tests/integration/testdata/invoke/cdk/cdk_template.yaml b/tests/integration/testdata/invoke/cdk/cdk_template.yaml index e4add871c6..3f5fcb804e 100644 --- a/tests/integration/testdata/invoke/cdk/cdk_template.yaml +++ b/tests/integration/testdata/invoke/cdk/cdk_template.yaml @@ -46,7 +46,7 @@ Resources: Ref: ModeEnvVariable FunctionName: HelloWorldFunction Handler: app.hello_world_handler - Runtime: python3.8 + Runtime: python3.9 DependsOn: - helloworldfunctionServiceRole306F1141 Metadata: @@ -100,7 +100,7 @@ Resources: MODE: Ref: ModeEnvVariable Handler: app.handler - Runtime: python3.8 + Runtime: python3.9 DependsOn: - helloworldserverlessfunctionServiceRole98ADBB39 Metadata: @@ -150,7 +150,7 @@ Resources: - timeoutfunctionServiceRoleA84BD66C - Arn Handler: app.timeout_handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 5 DependsOn: - timeoutfunctionServiceRoleA84BD66C @@ -204,7 +204,7 @@ Resources: Variables: CustomEnvVar: MyVar Handler: app.custom_env_var_echo_handler - Runtime: python3.8 + Runtime: python3.9 DependsOn: - customenvvarsfunctionServiceRoleAD9C51EC Metadata: @@ -254,7 +254,7 @@ Resources: - writetostdoutfunctionServiceRole5A54371E - Arn Handler: app.write_to_stdout - Runtime: python3.8 + Runtime: python3.9 DependsOn: - writetostdoutfunctionServiceRole5A54371E Metadata: @@ -304,7 +304,7 @@ Resources: - writetostderrfunctionServiceRole8B1BE086 - Arn Handler: app.write_to_stderr - Runtime: python3.8 + Runtime: python3.9 DependsOn: - writetostderrfunctionServiceRole8B1BE086 Metadata: @@ -355,7 +355,7 @@ Resources: - Arn FunctionName: CDKEchoEventFunction Handler: app.echo_event - Runtime: python3.8 + Runtime: python3.9 DependsOn: - echoeventfunctionServiceRole8CA711AF Metadata: @@ -409,7 +409,7 @@ Resources: MyRuntimeVersion: Ref: MyRuntimeVersion Handler: app.parameter_echo_handler - Runtime: python3.8 + Runtime: python3.9 DependsOn: - echoenvwithparametersServiceRoleB848F593 Metadata: diff --git a/tests/integration/testdata/invoke/terraform/invalid_no_local_code_project/main.tf b/tests/integration/testdata/invoke/terraform/invalid_no_local_code_project/main.tf index c9c92585f3..9566860465 100644 --- a/tests/integration/testdata/invoke/terraform/invalid_no_local_code_project/main.tf +++ b/tests/integration/testdata/invoke/terraform/invalid_no_local_code_project/main.tf @@ -34,7 +34,7 @@ resource "aws_lambda_function" "function" { s3_bucket = aws_s3_bucket.lambda_functions_code_bucket.id s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "s3_lambda_function" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/custom-plan.json b/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/custom-plan.json index 676752e311..66871a626d 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/custom-plan.json +++ b/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/custom-plan.json @@ -1 +1 @@ -{"format_version":"1.1","terraform_version":"1.4.6","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"sensitive_values":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}},{"address":"aws_lambda_function.remote_lambda_code","mode":"managed","type":"aws_lambda_function","name":"remote_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"function_name":"s3_remote_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":"lambda_code_bucket","s3_key":"remote_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_lambda_function.root_lambda","mode":"managed","type":"aws_lambda_function","name":"root_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"root_lambda","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_lambda_function.s3_lambda","mode":"managed","type":"aws_lambda_function","name":"s3_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"function_name":"s3_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":"lambda_code_bucket","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket":"lambda_code_bucket","bucket_prefix":null,"force_destroy":false,"tags":null,"timeouts":null},"sensitive_values":{"cors_rule":[],"grant":[],"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"replication_configuration":[],"server_side_encryption_configuration":[],"tags_all":{},"versioning":[],"website":[]}},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"acl":"private","bucket":"lambda_code_bucket","cache_control":null,"content":null,"content_base64":null,"content_disposition":null,"content_encoding":null,"content_language":null,"force_destroy":false,"key":"s3_lambda_code_key","metadata":null,"object_lock_legal_hold_status":null,"object_lock_mode":null,"object_lock_retain_until_date":null,"source":"HelloWorldFunction.zip","source_hash":null,"tags":null,"website_redirect":null},"sensitive_values":{"tags_all":{}}}],"child_modules":[{"resources":[{"address":"module.level1_lambda.aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"sensitive_values":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}},{"address":"module.level1_lambda.aws_lambda_function.this","mode":"managed","type":"aws_lambda_function","name":"this","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"level1_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}],"address":"module.level1_lambda","child_modules":[{"resources":[{"address":"module.level1_lambda.module.level2_lambda.aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"sensitive_values":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}},{"address":"module.level1_lambda.module.level2_lambda.aws_lambda_function.this","mode":"managed","type":"aws_lambda_function","name":"this","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"level2_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}],"address":"module.level1_lambda.module.level2_lambda"}]}]}},"resource_changes":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"after_unknown":{"arn":true,"create_date":true,"id":true,"inline_policy":true,"managed_policy_arns":true,"name_prefix":true,"tags_all":true,"unique_id":true},"before_sensitive":false,"after_sensitive":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}}},{"address":"aws_lambda_function.remote_lambda_code","mode":"managed","type":"aws_lambda_function","name":"remote_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"function_name":"s3_remote_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":"lambda_code_bucket","s3_key":"remote_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_lambda_function.root_lambda","mode":"managed","type":"aws_lambda_function","name":"root_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"root_lambda","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_lambda_function.s3_lambda","mode":"managed","type":"aws_lambda_function","name":"s3_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"function_name":"s3_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":"lambda_code_bucket","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"bucket":"lambda_code_bucket","bucket_prefix":null,"force_destroy":false,"tags":null,"timeouts":null},"after_unknown":{"acceleration_status":true,"acl":true,"arn":true,"bucket_domain_name":true,"bucket_regional_domain_name":true,"cors_rule":true,"grant":true,"hosted_zone_id":true,"id":true,"lifecycle_rule":true,"logging":true,"object_lock_configuration":true,"object_lock_enabled":true,"policy":true,"region":true,"replication_configuration":true,"request_payer":true,"server_side_encryption_configuration":true,"tags_all":true,"versioning":true,"website":true,"website_domain":true,"website_endpoint":true},"before_sensitive":false,"after_sensitive":{"cors_rule":[],"grant":[],"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"replication_configuration":[],"server_side_encryption_configuration":[],"tags_all":{},"versioning":[],"website":[]}}},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"acl":"private","bucket":"lambda_code_bucket","cache_control":null,"content":null,"content_base64":null,"content_disposition":null,"content_encoding":null,"content_language":null,"force_destroy":false,"key":"s3_lambda_code_key","metadata":null,"object_lock_legal_hold_status":null,"object_lock_mode":null,"object_lock_retain_until_date":null,"source":"HelloWorldFunction.zip","source_hash":null,"tags":null,"website_redirect":null},"after_unknown":{"bucket_key_enabled":true,"content_type":true,"etag":true,"id":true,"kms_key_id":true,"server_side_encryption":true,"storage_class":true,"tags_all":true,"version_id":true},"before_sensitive":false,"after_sensitive":{"tags_all":{}}}},{"address":"module.level1_lambda.aws_iam_role.iam_for_lambda","module_address":"module.level1_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"after_unknown":{"arn":true,"create_date":true,"id":true,"inline_policy":true,"managed_policy_arns":true,"name_prefix":true,"tags_all":true,"unique_id":true},"before_sensitive":false,"after_sensitive":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}}},{"address":"module.level1_lambda.aws_lambda_function.this","module_address":"module.level1_lambda","mode":"managed","type":"aws_lambda_function","name":"this","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"level1_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"module.level1_lambda.module.level2_lambda.aws_iam_role.iam_for_lambda","module_address":"module.level1_lambda.module.level2_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"after_unknown":{"arn":true,"create_date":true,"id":true,"inline_policy":true,"managed_policy_arns":true,"name_prefix":true,"tags_all":true,"unique_id":true},"before_sensitive":false,"after_sensitive":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}}},{"address":"module.level1_lambda.module.level2_lambda.aws_lambda_function.this","module_address":"module.level1_lambda.module.level2_lambda","mode":"managed","type":"aws_lambda_function","name":"this","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"level2_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}}],"configuration":{"provider_config":{"aws":{"name":"aws","full_name":"registry.terraform.io/hashicorp/aws"}},"root_module":{"resources":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_config_key":"aws","expressions":{"assume_role_policy":{"constant_value":"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n"},"name":{"constant_value":"iam_for_lambda"}},"schema_version":0},{"address":"aws_lambda_function.remote_lambda_code","mode":"managed","type":"aws_lambda_function","name":"remote_lambda_code","provider_config_key":"aws","expressions":{"function_name":{"constant_value":"s3_remote_lambda_function"},"handler":{"constant_value":"app.lambda_handler"},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.8"},"s3_bucket":{"constant_value":"lambda_code_bucket"},"s3_key":{"constant_value":"remote_lambda_code_key"},"timeout":{"constant_value":300}},"schema_version":0},{"address":"aws_lambda_function.root_lambda","mode":"managed","type":"aws_lambda_function","name":"root_lambda","provider_config_key":"aws","expressions":{"filename":{"constant_value":"HelloWorldFunction.zip"},"function_name":{"constant_value":"root_lambda"},"handler":{"constant_value":"app.lambda_handler"},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.8"},"timeout":{"constant_value":300}},"schema_version":0},{"address":"aws_lambda_function.s3_lambda","mode":"managed","type":"aws_lambda_function","name":"s3_lambda","provider_config_key":"aws","expressions":{"function_name":{"constant_value":"s3_lambda_function"},"handler":{"constant_value":"app.lambda_handler"},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.8"},"s3_bucket":{"constant_value":"lambda_code_bucket"},"s3_key":{"constant_value":"s3_lambda_code_key"},"timeout":{"constant_value":500}},"schema_version":0},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_config_key":"aws","expressions":{"bucket":{"constant_value":"lambda_code_bucket"}},"schema_version":0},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_config_key":"aws","expressions":{"bucket":{"constant_value":"lambda_code_bucket"},"key":{"constant_value":"s3_lambda_code_key"},"source":{"constant_value":"HelloWorldFunction.zip"}},"schema_version":0}],"module_calls":{"level1_lambda":{"source":"./lambda","expressions":{"function_name":{"constant_value":"level1_lambda_function"},"handler":{"constant_value":"app.lambda_handler"},"source_code_path":{"constant_value":"HelloWorldFunction.zip"}},"module":{"resources":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_config_key":"aws","expressions":{"assume_role_policy":{"constant_value":"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n"},"name":{"constant_value":"iam_for_lambda"}},"schema_version":0},{"address":"aws_lambda_function.this","mode":"managed","type":"aws_lambda_function","name":"this","provider_config_key":"aws","expressions":{"filename":{"references":["var.source_code_path"]},"function_name":{"references":["var.function_name"]},"handler":{"references":["var.handler"]},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.8"},"timeout":{"constant_value":300}},"schema_version":0}],"module_calls":{"level2_lambda":{"source":"./lambda2","expressions":{"function_name":{"constant_value":"level2_lambda_function"},"handler":{"constant_value":"app.lambda_handler"},"source_code_path":{"constant_value":"HelloWorldFunction.zip"}},"module":{"resources":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_config_key":"aws","expressions":{"assume_role_policy":{"constant_value":"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n"},"name":{"constant_value":"iam_for_lambda"}},"schema_version":0},{"address":"aws_lambda_function.this","mode":"managed","type":"aws_lambda_function","name":"this","provider_config_key":"aws","expressions":{"filename":{"references":["var.source_code_path"]},"function_name":{"references":["var.function_name"]},"handler":{"references":["var.handler"]},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.8"},"timeout":{"constant_value":300}},"schema_version":0}],"variables":{"function_name":{},"handler":{},"source_code_path":{}}}}},"variables":{"function_name":{},"handler":{},"source_code_path":{}}}}}}},"relevant_attributes":[{"resource":"module.level1_lambda.module.level2_lambda.aws_iam_role.iam_for_lambda","attribute":["arn"]},{"resource":"aws_iam_role.iam_for_lambda","attribute":["arn"]},{"resource":"module.level1_lambda.aws_iam_role.iam_for_lambda","attribute":["arn"]}]} +{"format_version":"1.1","terraform_version":"1.4.6","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"sensitive_values":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}},{"address":"aws_lambda_function.remote_lambda_code","mode":"managed","type":"aws_lambda_function","name":"remote_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"function_name":"s3_remote_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":"lambda_code_bucket","s3_key":"remote_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_lambda_function.root_lambda","mode":"managed","type":"aws_lambda_function","name":"root_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"root_lambda","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_lambda_function.s3_lambda","mode":"managed","type":"aws_lambda_function","name":"s3_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"function_name":"s3_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":"lambda_code_bucket","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket":"lambda_code_bucket","bucket_prefix":null,"force_destroy":false,"tags":null,"timeouts":null},"sensitive_values":{"cors_rule":[],"grant":[],"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"replication_configuration":[],"server_side_encryption_configuration":[],"tags_all":{},"versioning":[],"website":[]}},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"acl":"private","bucket":"lambda_code_bucket","cache_control":null,"content":null,"content_base64":null,"content_disposition":null,"content_encoding":null,"content_language":null,"force_destroy":false,"key":"s3_lambda_code_key","metadata":null,"object_lock_legal_hold_status":null,"object_lock_mode":null,"object_lock_retain_until_date":null,"source":"HelloWorldFunction.zip","source_hash":null,"tags":null,"website_redirect":null},"sensitive_values":{"tags_all":{}}}],"child_modules":[{"resources":[{"address":"module.level1_lambda.aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"sensitive_values":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}},{"address":"module.level1_lambda.aws_lambda_function.this","mode":"managed","type":"aws_lambda_function","name":"this","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"level1_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}],"address":"module.level1_lambda","child_modules":[{"resources":[{"address":"module.level1_lambda.module.level2_lambda.aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"sensitive_values":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}},{"address":"module.level1_lambda.module.level2_lambda.aws_lambda_function.this","mode":"managed","type":"aws_lambda_function","name":"this","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"level2_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}],"address":"module.level1_lambda.module.level2_lambda"}]}]}},"resource_changes":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"after_unknown":{"arn":true,"create_date":true,"id":true,"inline_policy":true,"managed_policy_arns":true,"name_prefix":true,"tags_all":true,"unique_id":true},"before_sensitive":false,"after_sensitive":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}}},{"address":"aws_lambda_function.remote_lambda_code","mode":"managed","type":"aws_lambda_function","name":"remote_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"function_name":"s3_remote_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":"lambda_code_bucket","s3_key":"remote_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_lambda_function.root_lambda","mode":"managed","type":"aws_lambda_function","name":"root_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"root_lambda","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_lambda_function.s3_lambda","mode":"managed","type":"aws_lambda_function","name":"s3_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"function_name":"s3_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":"lambda_code_bucket","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"bucket":"lambda_code_bucket","bucket_prefix":null,"force_destroy":false,"tags":null,"timeouts":null},"after_unknown":{"acceleration_status":true,"acl":true,"arn":true,"bucket_domain_name":true,"bucket_regional_domain_name":true,"cors_rule":true,"grant":true,"hosted_zone_id":true,"id":true,"lifecycle_rule":true,"logging":true,"object_lock_configuration":true,"object_lock_enabled":true,"policy":true,"region":true,"replication_configuration":true,"request_payer":true,"server_side_encryption_configuration":true,"tags_all":true,"versioning":true,"website":true,"website_domain":true,"website_endpoint":true},"before_sensitive":false,"after_sensitive":{"cors_rule":[],"grant":[],"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"replication_configuration":[],"server_side_encryption_configuration":[],"tags_all":{},"versioning":[],"website":[]}}},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"acl":"private","bucket":"lambda_code_bucket","cache_control":null,"content":null,"content_base64":null,"content_disposition":null,"content_encoding":null,"content_language":null,"force_destroy":false,"key":"s3_lambda_code_key","metadata":null,"object_lock_legal_hold_status":null,"object_lock_mode":null,"object_lock_retain_until_date":null,"source":"HelloWorldFunction.zip","source_hash":null,"tags":null,"website_redirect":null},"after_unknown":{"bucket_key_enabled":true,"content_type":true,"etag":true,"id":true,"kms_key_id":true,"server_side_encryption":true,"storage_class":true,"tags_all":true,"version_id":true},"before_sensitive":false,"after_sensitive":{"tags_all":{}}}},{"address":"module.level1_lambda.aws_iam_role.iam_for_lambda","module_address":"module.level1_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"after_unknown":{"arn":true,"create_date":true,"id":true,"inline_policy":true,"managed_policy_arns":true,"name_prefix":true,"tags_all":true,"unique_id":true},"before_sensitive":false,"after_sensitive":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}}},{"address":"module.level1_lambda.aws_lambda_function.this","module_address":"module.level1_lambda","mode":"managed","type":"aws_lambda_function","name":"this","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"level1_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"module.level1_lambda.module.level2_lambda.aws_iam_role.iam_for_lambda","module_address":"module.level1_lambda.module.level2_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"name":"iam_for_lambda","path":"/","permissions_boundary":null,"tags":null},"after_unknown":{"arn":true,"create_date":true,"id":true,"inline_policy":true,"managed_policy_arns":true,"name_prefix":true,"tags_all":true,"unique_id":true},"before_sensitive":false,"after_sensitive":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}}},{"address":"module.level1_lambda.module.level2_lambda.aws_lambda_function.this","module_address":"module.level1_lambda.module.level2_lambda","mode":"managed","type":"aws_lambda_function","name":"this","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":"HelloWorldFunction.zip","function_name":"level2_lambda_function","handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_bucket":null,"s3_key":null,"s3_object_version":null,"snap_start":[],"tags":null,"timeout":300,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}}],"configuration":{"provider_config":{"aws":{"name":"aws","full_name":"registry.terraform.io/hashicorp/aws"}},"root_module":{"resources":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_config_key":"aws","expressions":{"assume_role_policy":{"constant_value":"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n"},"name":{"constant_value":"iam_for_lambda"}},"schema_version":0},{"address":"aws_lambda_function.remote_lambda_code","mode":"managed","type":"aws_lambda_function","name":"remote_lambda_code","provider_config_key":"aws","expressions":{"function_name":{"constant_value":"s3_remote_lambda_function"},"handler":{"constant_value":"app.lambda_handler"},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.9"},"s3_bucket":{"constant_value":"lambda_code_bucket"},"s3_key":{"constant_value":"remote_lambda_code_key"},"timeout":{"constant_value":300}},"schema_version":0},{"address":"aws_lambda_function.root_lambda","mode":"managed","type":"aws_lambda_function","name":"root_lambda","provider_config_key":"aws","expressions":{"filename":{"constant_value":"HelloWorldFunction.zip"},"function_name":{"constant_value":"root_lambda"},"handler":{"constant_value":"app.lambda_handler"},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.9"},"timeout":{"constant_value":300}},"schema_version":0},{"address":"aws_lambda_function.s3_lambda","mode":"managed","type":"aws_lambda_function","name":"s3_lambda","provider_config_key":"aws","expressions":{"function_name":{"constant_value":"s3_lambda_function"},"handler":{"constant_value":"app.lambda_handler"},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.9"},"s3_bucket":{"constant_value":"lambda_code_bucket"},"s3_key":{"constant_value":"s3_lambda_code_key"},"timeout":{"constant_value":500}},"schema_version":0},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_config_key":"aws","expressions":{"bucket":{"constant_value":"lambda_code_bucket"}},"schema_version":0},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_config_key":"aws","expressions":{"bucket":{"constant_value":"lambda_code_bucket"},"key":{"constant_value":"s3_lambda_code_key"},"source":{"constant_value":"HelloWorldFunction.zip"}},"schema_version":0}],"module_calls":{"level1_lambda":{"source":"./lambda","expressions":{"function_name":{"constant_value":"level1_lambda_function"},"handler":{"constant_value":"app.lambda_handler"},"source_code_path":{"constant_value":"HelloWorldFunction.zip"}},"module":{"resources":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_config_key":"aws","expressions":{"assume_role_policy":{"constant_value":"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n"},"name":{"constant_value":"iam_for_lambda"}},"schema_version":0},{"address":"aws_lambda_function.this","mode":"managed","type":"aws_lambda_function","name":"this","provider_config_key":"aws","expressions":{"filename":{"references":["var.source_code_path"]},"function_name":{"references":["var.function_name"]},"handler":{"references":["var.handler"]},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.9"},"timeout":{"constant_value":300}},"schema_version":0}],"module_calls":{"level2_lambda":{"source":"./lambda2","expressions":{"function_name":{"constant_value":"level2_lambda_function"},"handler":{"constant_value":"app.lambda_handler"},"source_code_path":{"constant_value":"HelloWorldFunction.zip"}},"module":{"resources":[{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_config_key":"aws","expressions":{"assume_role_policy":{"constant_value":"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n"},"name":{"constant_value":"iam_for_lambda"}},"schema_version":0},{"address":"aws_lambda_function.this","mode":"managed","type":"aws_lambda_function","name":"this","provider_config_key":"aws","expressions":{"filename":{"references":["var.source_code_path"]},"function_name":{"references":["var.function_name"]},"handler":{"references":["var.handler"]},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.9"},"timeout":{"constant_value":300}},"schema_version":0}],"variables":{"function_name":{},"handler":{},"source_code_path":{}}}}},"variables":{"function_name":{},"handler":{},"source_code_path":{}}}}}}},"relevant_attributes":[{"resource":"module.level1_lambda.module.level2_lambda.aws_iam_role.iam_for_lambda","attribute":["arn"]},{"resource":"aws_iam_role.iam_for_lambda","attribute":["arn"]},{"resource":"module.level1_lambda.aws_iam_role.iam_for_lambda","attribute":["arn"]}]} diff --git a/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/lambda/lambda2/main.tf b/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/lambda/lambda2/main.tf index 85d5988040..fedef55439 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/lambda/lambda2/main.tf +++ b/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/lambda/lambda2/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name timeout = 300 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/lambda/main.tf b/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/lambda/main.tf index 5bfb7f3de2..304beebd41 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/lambda/main.tf +++ b/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/lambda/main.tf @@ -34,7 +34,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code_path handler = var.handler - runtime = "python3.8" + runtime = "python3.9" function_name = var.function_name timeout = 300 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/main.tf b/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/main.tf index 2af2132d35..7d769d9a08 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/main.tf +++ b/tests/integration/testdata/invoke/terraform/simple_application_no_building_logic/main.tf @@ -35,7 +35,7 @@ resource "aws_lambda_function" "s3_lambda" { s3_bucket = "lambda_code_bucket" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "s3_lambda_function" timeout = 500 role = aws_iam_role.iam_for_lambda.arn @@ -45,7 +45,7 @@ resource "aws_lambda_function" "remote_lambda_code" { s3_bucket = "lambda_code_bucket" s3_key = "remote_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = "s3_remote_lambda_function" role = aws_iam_role.iam_for_lambda.arn @@ -54,7 +54,7 @@ resource "aws_lambda_function" "remote_lambda_code" { resource "aws_lambda_function" "root_lambda" { filename = "HelloWorldFunction.zip" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "root_lambda" timeout = 300 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function/main.tf b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function/main.tf index b1bffc32dd..02a56d7f46 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function/main.tf +++ b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function/main.tf @@ -39,7 +39,7 @@ resource "aws_lambda_function" "this" { count = 1 filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function_with_const_layer/main.tf b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function_with_const_layer/main.tf index 71325fb9de..898982c99d 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function_with_const_layer/main.tf +++ b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function_with_const_layer/main.tf @@ -33,7 +33,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function_with_const_layers_using_data_sources/main.tf b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function_with_const_layers_using_data_sources/main.tf index e11882a9b3..19a3baa821 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function_with_const_layers_using_data_sources/main.tf +++ b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_function_with_const_layers_using_data_sources/main.tf @@ -40,7 +40,7 @@ EOF resource "aws_lambda_function" "this" { filename = var.source_code handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 function_name = var.function_name role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_layer/main.tf b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_layer/main.tf index bdd0ab7dda..67ef4fc6c5 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_layer/main.tf +++ b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/lambda_layer/main.tf @@ -10,7 +10,7 @@ resource "aws_lambda_layer_version" "layer" { filename = var.source_code layer_name = var.name - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } output "arn" { diff --git a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/main.tf b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/main.tf index 2d2af4f8e3..f7e8bb3d00 100644 --- a/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/main.tf +++ b/tests/integration/testdata/invoke/terraform/simple_application_with_layers_no_building_logic/main.tf @@ -65,7 +65,7 @@ resource "aws_lambda_layer_version" "layer4" { filename = "./artifacts/simple_layer4.zip" layer_name = "lambda_layer4_${random_pet.this.id}" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } module "layer5" { @@ -84,7 +84,7 @@ resource "aws_lambda_layer_version" "layer6" { s3_bucket = aws_s3_bucket.lambda_functions_code_bucket.id s3_key = "layer6_code" layer_name = "lambda_layer6_${random_pet.this.id}" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } resource "aws_s3_object" "layer7_code" { @@ -97,13 +97,13 @@ resource "aws_lambda_layer_version" "layer7" { s3_bucket = var.BUCKET_NAME s3_key = "layer7_code" layer_name = "lambda_layer7_${random_pet.this.id}" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } resource "aws_lambda_function" "function1" { filename = "./artifacts/HelloWorldFunction.zip" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function1_${random_pet.this.id}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -115,7 +115,7 @@ resource "aws_lambda_function" "function1" { resource "aws_lambda_function" "function2" { filename = "./artifacts/HelloWorldFunction.zip" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function2_${random_pet.this.id}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -127,7 +127,7 @@ resource "aws_lambda_function" "function2" { resource "aws_lambda_function" "function3" { filename = "./artifacts/HelloWorldFunction.zip" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function3_${random_pet.this.id}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -139,7 +139,7 @@ resource "aws_lambda_function" "function3" { resource "aws_lambda_function" "function4" { filename = "./artifacts/HelloWorldFunction.zip" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function4_${random_pet.this.id}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -166,7 +166,7 @@ resource "aws_lambda_function" "function6" { s3_bucket = aws_s3_bucket.lambda_functions_code_bucket.id s3_key = "function6_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function6_${random_pet.this.id}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -185,7 +185,7 @@ resource "aws_lambda_function" "function7" { s3_bucket = var.BUCKET_NAME s3_key = "function7_code" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "function7_${random_pet.this.id}" role = aws_iam_role.iam_for_lambda.arn timeout = 300 @@ -201,8 +201,8 @@ module "layer8" { create_layer = true create_package = false layer_name = "lambda_layer8_${random_pet.this.id}" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" local_existing_package = "./artifacts/simple_layer8.zip" } @@ -222,8 +222,8 @@ module "layer9" { key = "layer9_code" } layer_name = "lambda_layer9_${random_pet.this.id}" - compatible_runtimes = ["python3.8"] - runtime = "python3.8" + compatible_runtimes = ["python3.9"] + runtime = "python3.9" } module "function8" { @@ -232,7 +232,7 @@ module "function8" { create_package = false function_name = "function8_${random_pet.this.id}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" timeout = 300 layers = [module.layer8.lambda_layer_arn] @@ -256,7 +256,7 @@ module "function9" { timeout = 300 function_name = "function9_${random_pet.this.id}" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" layers = [module.layer9.lambda_layer_arn] } diff --git a/tests/integration/testdata/list/test_endpoints_template.yaml b/tests/integration/testdata/list/test_endpoints_template.yaml index 7d8a81fec7..499ceddebc 100644 --- a/tests/integration/testdata/list/test_endpoints_template.yaml +++ b/tests/integration/testdata/list/test_endpoints_template.yaml @@ -17,7 +17,7 @@ Resources: Properties: CodeUri: hello_world/ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 FunctionUrlConfig: AuthType: AWS_IAM Architectures: diff --git a/tests/integration/testdata/list/test_resources_invalid_sam_template.yaml b/tests/integration/testdata/list/test_resources_invalid_sam_template.yaml index 66a5842012..35398adb92 100644 --- a/tests/integration/testdata/list/test_resources_invalid_sam_template.yaml +++ b/tests/integration/testdata/list/test_resources_invalid_sam_template.yaml @@ -17,7 +17,7 @@ ResourcesMissing: Properties: CodeUri: hello_world/ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 Events: diff --git a/tests/integration/testdata/list/test_stack_creation_template.yaml b/tests/integration/testdata/list/test_stack_creation_template.yaml index 1601d5ea8f..2b1317072d 100644 --- a/tests/integration/testdata/list/test_stack_creation_template.yaml +++ b/tests/integration/testdata/list/test_stack_creation_template.yaml @@ -14,7 +14,7 @@ Resources: Properties: CodeUri: hello_world/ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 Events: diff --git a/tests/integration/testdata/list/test_stack_no_outputs_template.yaml b/tests/integration/testdata/list/test_stack_no_outputs_template.yaml index 1f64430eba..a8f8b4a2b7 100644 --- a/tests/integration/testdata/list/test_stack_no_outputs_template.yaml +++ b/tests/integration/testdata/list/test_stack_no_outputs_template.yaml @@ -14,7 +14,7 @@ Resources: Properties: CodeUri: hello_world/ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 Events: diff --git a/tests/integration/testdata/package/aws-lambda-function-image-and-api.yaml b/tests/integration/testdata/package/aws-lambda-function-image-and-api.yaml index 8210b83662..a9d71ca473 100644 --- a/tests/integration/testdata/package/aws-lambda-function-image-and-api.yaml +++ b/tests/integration/testdata/package/aws-lambda-function-image-and-api.yaml @@ -8,7 +8,7 @@ Resources: Properties: PackageType: Image Code: - ImageUri: "emulation-python3.8:latest" + ImageUri: "emulation-python3.9:latest" Role: Fn::GetAtt: - "LambdaExecutionRole" diff --git a/tests/integration/testdata/package/aws-lambda-function-image.yaml b/tests/integration/testdata/package/aws-lambda-function-image.yaml index 25b40aacd7..06688b8e0c 100644 --- a/tests/integration/testdata/package/aws-lambda-function-image.yaml +++ b/tests/integration/testdata/package/aws-lambda-function-image.yaml @@ -8,7 +8,7 @@ Resources: Properties: PackageType: Image Code: - ImageUri: emulation-python3.8:latest + ImageUri: emulation-python3.9:latest Role: Fn::GetAtt: - "HelloWorldFunctionRole" diff --git a/tests/integration/testdata/package/aws-serverless-function-image.yaml b/tests/integration/testdata/package/aws-serverless-function-image.yaml index f5864bebb5..175bdf5c3c 100644 --- a/tests/integration/testdata/package/aws-serverless-function-image.yaml +++ b/tests/integration/testdata/package/aws-serverless-function-image.yaml @@ -7,7 +7,7 @@ Resources: Type: AWS::Serverless::Function Properties: PackageType: Image - ImageUri: emulation-python3.8:latest + ImageUri: emulation-python3.9:latest Events: HelloWorld: Type: Api diff --git a/tests/integration/testdata/package/deep-nested-image/ChildStackX/ChildStackY/template.yaml b/tests/integration/testdata/package/deep-nested-image/ChildStackX/ChildStackY/template.yaml index 2fc93a6bfe..097162a6ee 100644 --- a/tests/integration/testdata/package/deep-nested-image/ChildStackX/ChildStackY/template.yaml +++ b/tests/integration/testdata/package/deep-nested-image/ChildStackX/ChildStackY/template.yaml @@ -7,4 +7,4 @@ Resources: Type: AWS::Serverless::Function Properties: PackageType: Image - ImageUri: emulation-python3.8:latest \ No newline at end of file + ImageUri: emulation-python3.9:latest \ No newline at end of file diff --git a/tests/integration/testdata/package/deep-nested-image/ChildStackX/template.yaml b/tests/integration/testdata/package/deep-nested-image/ChildStackX/template.yaml index 0c26cd70e5..078c2f328a 100644 --- a/tests/integration/testdata/package/deep-nested-image/ChildStackX/template.yaml +++ b/tests/integration/testdata/package/deep-nested-image/ChildStackX/template.yaml @@ -7,7 +7,7 @@ Resources: Type: AWS::Serverless::Function Properties: PackageType: Image - ImageUri: emulation-python3.8-2:latest + ImageUri: emulation-python3.9-2:latest ChildStackY: Type: AWS::Serverless::Application diff --git a/tests/integration/testdata/package/deep-nested-image/template.yaml b/tests/integration/testdata/package/deep-nested-image/template.yaml index c464e77194..8cd472e0cf 100644 --- a/tests/integration/testdata/package/deep-nested-image/template.yaml +++ b/tests/integration/testdata/package/deep-nested-image/template.yaml @@ -7,7 +7,7 @@ Resources: Type: AWS::Serverless::Function Properties: PackageType: Image - ImageUri: emulation-python3.8:latest + ImageUri: emulation-python3.9:latest ChildStackX: Type: AWS::Serverless::Application diff --git a/tests/integration/testdata/start_api/cdk/template-cdk-warm-container.yaml b/tests/integration/testdata/start_api/cdk/template-cdk-warm-container.yaml index 34cb214766..89f53debef 100644 --- a/tests/integration/testdata/start_api/cdk/template-cdk-warm-container.yaml +++ b/tests/integration/testdata/start_api/cdk/template-cdk-warm-container.yaml @@ -47,7 +47,7 @@ Resources: Ref: ModeEnvVariable FunctionName: HelloWorldFunction Handler: main.handler - Runtime: python3.8 + Runtime: python3.9 DependsOn: - helloworldfunctionServiceRole306F1141 Metadata: @@ -431,7 +431,7 @@ Resources: Ref: ModeEnvVariable FunctionName: EchoEventFunction Handler: main.echo_event_handler - Runtime: python3.8 + Runtime: python3.9 DependsOn: - echoeventfunctionServiceRole47C73665 Metadata: diff --git a/tests/integration/testdata/start_api/cdk/template-cors-configs.yaml b/tests/integration/testdata/start_api/cdk/template-cors-configs.yaml index 0f85714448..7806a77d34 100644 --- a/tests/integration/testdata/start_api/cdk/template-cors-configs.yaml +++ b/tests/integration/testdata/start_api/cdk/template-cors-configs.yaml @@ -274,7 +274,7 @@ Resources: - LambdaServiceRoleA8ED4D3B - Arn Handler: main.handler - Runtime: python3.8 + Runtime: python3.9 DependsOn: - LambdaServiceRoleA8ED4D3B Metadata: diff --git a/tests/integration/testdata/start_api/cdk/template_cdk.yaml b/tests/integration/testdata/start_api/cdk/template_cdk.yaml index 7d34a0be3d..9f8713565a 100644 --- a/tests/integration/testdata/start_api/cdk/template_cdk.yaml +++ b/tests/integration/testdata/start_api/cdk/template_cdk.yaml @@ -43,7 +43,7 @@ Resources: - Arn FunctionName: HelloWorldFunction Handler: main.handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - helloworldfunctionServiceRole306F1141 @@ -424,7 +424,7 @@ Resources: - Arn FunctionName: EchoEventFunction Handler: main.echo_event_handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - echoeventfunctionServiceRole47C73665 @@ -814,7 +814,7 @@ Resources: - Arn FunctionName: EchoEventFunction2 Handler: main.echo_event_handler_2 - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - echoeventfunction2ServiceRoleCF3FCF98 @@ -1008,7 +1008,7 @@ Resources: - Arn FunctionName: EchoIntegerBodyFunction Handler: main.echo_integer_body - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - echointegerbodyfunctionServiceRole686B7DCD @@ -1202,7 +1202,7 @@ Resources: - Arn FunctionName: ContentTypeSetterFunction Handler: main.content_type_setter_handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - contenttypesetterfunctionServiceRole9494BDDA @@ -1396,7 +1396,7 @@ Resources: - Arn FunctionName: OnlySetStatusCodeFunction Handler: main.only_set_status_code_handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - onlysetstatuscodefunctionServiceRole3427497E @@ -1590,7 +1590,7 @@ Resources: - Arn FunctionName: OnlySetBodyFunction Handler: main.only_set_body_handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - onlysetbodyfunctionServiceRole1C4259D7 @@ -1784,7 +1784,7 @@ Resources: - Arn FunctionName: StringStatusCodeFunction Handler: main.string_status_code_handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - stringstatuscodefunctionServiceRoleF56162DC @@ -1978,7 +1978,7 @@ Resources: - Arn FunctionName: SleepFunction0 Handler: main.sleep_10_sec_handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - sleep10secfunctionServiceRole0DDC3333 @@ -2183,7 +2183,7 @@ Resources: - Arn FunctionName: SleepFunction1 Handler: main.sleep_10_sec_handler - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - sleepfunction1ServiceRoleCCAD8A5E @@ -2388,7 +2388,7 @@ Resources: - Arn FunctionName: WriteToStderrFunction Handler: main.write_to_stderr - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - writetostderrServiceRoleD7C9BDAE @@ -2582,7 +2582,7 @@ Resources: - Arn FunctionName: WriteToStdoutFunction Handler: main.write_to_stdout - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - writetostdoutfunctionServiceRoleE2F60DD4 @@ -2776,7 +2776,7 @@ Resources: - Arn FunctionName: InvalidResponseFromLambdaFunction Handler: main.invalid_response_returned - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - invalidresponsereturnedfunctionServiceRole84CA52A7 @@ -2970,7 +2970,7 @@ Resources: - Arn FunctionName: InvalidResponseHashFromLambdaFunction Handler: main.invalid_hash_response - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - invalidhashresponsefunctionServiceRoleD5BA0280 @@ -3164,7 +3164,7 @@ Resources: - Arn FunctionName: Base64ResponseFunction Handler: main.base64_response - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - base64responsefunctionServiceRole22C52018 @@ -3358,7 +3358,7 @@ Resources: - Arn FunctionName: EchoBase64EventBodyFunction Handler: main.echo_base64_event_body - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - echobase64eventbodyfunctionServiceRoleAF0B2DEC @@ -3552,7 +3552,7 @@ Resources: - Arn FunctionName: MultipleHeadersResponseFunction Handler: main.multiple_headers - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - multipleheadersfunctionServiceRoleA8A47400 @@ -3746,7 +3746,7 @@ Resources: - Arn FunctionName: MultipleHeadersOverridesHeadersResponseFunction Handler: main.multiple_headers_overrides_headers - Runtime: python3.8 + Runtime: python3.9 Timeout: 600 DependsOn: - multipleheadersoverridesheadersfunctionServiceRole8A1BD492 diff --git a/tests/integration/testdata/start_api/lambda_authorizers/cfn-apigw-v1.yaml b/tests/integration/testdata/start_api/lambda_authorizers/cfn-apigw-v1.yaml index 6ac6fcd834..d3fe104c45 100644 --- a/tests/integration/testdata/start_api/lambda_authorizers/cfn-apigw-v1.yaml +++ b/tests/integration/testdata/start_api/lambda_authorizers/cfn-apigw-v1.yaml @@ -27,7 +27,7 @@ Resources: Properties: CodeUri: ./ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 HelloWorldFunctionPermission: @@ -44,7 +44,7 @@ Resources: Properties: CodeUri: ./ Handler: !Ref AuthHandler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 AuthorizerPermission: diff --git a/tests/integration/testdata/start_api/lambda_authorizers/cfn-apigw-v2.yaml b/tests/integration/testdata/start_api/lambda_authorizers/cfn-apigw-v2.yaml index 09b1611471..885922fdd0 100644 --- a/tests/integration/testdata/start_api/lambda_authorizers/cfn-apigw-v2.yaml +++ b/tests/integration/testdata/start_api/lambda_authorizers/cfn-apigw-v2.yaml @@ -31,7 +31,7 @@ Resources: Properties: CodeUri: ./ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 HelloWorldFunctionPermission: @@ -48,7 +48,7 @@ Resources: Properties: CodeUri: ./ Handler: !Ref AuthHandler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 AuthorizerPermission: diff --git a/tests/integration/testdata/start_api/lambda_authorizers/serverless-api-props.yaml b/tests/integration/testdata/start_api/lambda_authorizers/serverless-api-props.yaml index 721d53c383..6b446777cc 100644 --- a/tests/integration/testdata/start_api/lambda_authorizers/serverless-api-props.yaml +++ b/tests/integration/testdata/start_api/lambda_authorizers/serverless-api-props.yaml @@ -40,7 +40,7 @@ Resources: Properties: CodeUri: ./ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 Events: @@ -57,7 +57,7 @@ Resources: Properties: CodeUri: ./ Handler: !Ref AuthHandler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 AuthorizerPermission: diff --git a/tests/integration/testdata/start_api/lambda_authorizers/serverless-http-props.yaml b/tests/integration/testdata/start_api/lambda_authorizers/serverless-http-props.yaml index 95a0331d49..7f291e3c3d 100644 --- a/tests/integration/testdata/start_api/lambda_authorizers/serverless-http-props.yaml +++ b/tests/integration/testdata/start_api/lambda_authorizers/serverless-http-props.yaml @@ -57,7 +57,7 @@ Resources: Properties: CodeUri: ./ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 Events: @@ -74,7 +74,7 @@ Resources: Properties: CodeUri: ./ Handler: !Ref AuthHandler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 AuthorizerPermission: @@ -88,7 +88,7 @@ Resources: Properties: CodeUri: ./ Handler: !Ref AuthSimpleHandler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 AuthorizerSimplePermission: diff --git a/tests/integration/testdata/start_api/lambda_authorizers/swagger-api.yaml b/tests/integration/testdata/start_api/lambda_authorizers/swagger-api.yaml index e4c1f50a88..706356767f 100644 --- a/tests/integration/testdata/start_api/lambda_authorizers/swagger-api.yaml +++ b/tests/integration/testdata/start_api/lambda_authorizers/swagger-api.yaml @@ -138,7 +138,7 @@ Resources: Properties: CodeUri: ./ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 HelloWorldFunctionPermission: @@ -156,7 +156,7 @@ Resources: CodeUri: ./ Handler: !Ref AuthHandler # Handler: app.unauth - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 AuthorizerFunctionPermission: diff --git a/tests/integration/testdata/start_api/lambda_authorizers/swagger-http.yaml b/tests/integration/testdata/start_api/lambda_authorizers/swagger-http.yaml index 52dbaee3e2..423b1423c1 100644 --- a/tests/integration/testdata/start_api/lambda_authorizers/swagger-http.yaml +++ b/tests/integration/testdata/start_api/lambda_authorizers/swagger-http.yaml @@ -65,7 +65,7 @@ Resources: Properties: CodeUri: ./ Handler: app.lambda_handler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 HelloWorldFunctionPermission: @@ -82,7 +82,7 @@ Resources: Properties: CodeUri: ./ Handler: !Ref AuthHandler - Runtime: python3.8 + Runtime: python3.9 Architectures: - x86_64 AuthorizerFunctionPermission: diff --git a/tests/integration/testdata/start_api/terraform/lambda-auth-openapi/main.tf b/tests/integration/testdata/start_api/terraform/lambda-auth-openapi/main.tf index 33fa9b91a8..945b1fd578 100644 --- a/tests/integration/testdata/start_api/terraform/lambda-auth-openapi/main.tf +++ b/tests/integration/testdata/start_api/terraform/lambda-auth-openapi/main.tf @@ -22,7 +22,7 @@ resource "aws_lambda_function" "authorizer" { function_name = "authorizer-open-api_${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "handlers.auth_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } @@ -31,7 +31,7 @@ resource "aws_lambda_function" "hello_endpoint" { function_name = "hello-lambda-open-api_${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "handlers.hello_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } diff --git a/tests/integration/testdata/start_api/terraform/terraform-api-simple-local-variables-limitation/main.tf b/tests/integration/testdata/start_api/terraform/terraform-api-simple-local-variables-limitation/main.tf index 2f4d694f3d..d620fcecea 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-api-simple-local-variables-limitation/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-api-simple-local-variables-limitation/main.tf @@ -45,14 +45,14 @@ resource "aws_s3_object" "s3_lambda_code" { resource "aws_lambda_layer_version" "MyAwesomeLayer" { filename = "HelloWorldFunction.zip" layer_name = "MyAwesomeLayer" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } resource "aws_lambda_function" "HelloWorldFunction" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction-${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn @@ -64,7 +64,7 @@ resource "aws_lambda_function" "HelloWorldFunction2" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction2-${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/start_api/terraform/terraform-api-simple-multiple-resources-limitation/main.tf b/tests/integration/testdata/start_api/terraform/terraform-api-simple-multiple-resources-limitation/main.tf index 7a633c454b..c3da521001 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-api-simple-multiple-resources-limitation/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-api-simple-multiple-resources-limitation/main.tf @@ -47,14 +47,14 @@ resource "aws_s3_object" "s3_lambda_code" { resource "aws_lambda_layer_version" "MyAwesomeLayer" { filename = "HelloWorldFunction.zip" layer_name = "MyAwesomeLayer" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } resource "aws_lambda_function" "HelloWorldFunction" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction-${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn @@ -66,7 +66,7 @@ resource "aws_lambda_function" "HelloWorldFunction2" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction2-${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/start_api/terraform/terraform-v1-api-simple/custom-plan.json b/tests/integration/testdata/start_api/terraform/terraform-v1-api-simple/custom-plan.json index 055fc65734..676852c6de 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v1-api-simple/custom-plan.json +++ b/tests/integration/testdata/start_api/terraform/terraform-v1-api-simple/custom-plan.json @@ -1 +1 @@ -{"format_version":"1.1","terraform_version":"1.4.6","planned_values":{"root_module":{"resources":[{"address":"aws_api_gateway_deployment.MyDemoDeployment","mode":"managed","type":"aws_api_gateway_deployment","name":"MyDemoDeployment","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"description":null,"stage_description":null,"stage_name":null,"variables":null},"sensitive_values":{"triggers":{}}},{"address":"aws_api_gateway_integration.MyDemoIntegration","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegration","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"cache_key_parameters":null,"connection_id":null,"connection_type":"INTERNET","content_handling":"CONVERT_TO_TEXT","credentials":null,"http_method":"GET","integration_http_method":"POST","request_parameters":null,"request_templates":null,"timeout_milliseconds":29000,"tls_config":[],"type":"AWS_PROXY"},"sensitive_values":{"tls_config":[]}},{"address":"aws_api_gateway_integration.MyDemoIntegrationMock","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegrationMock","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"cache_key_parameters":null,"connection_id":null,"connection_type":"INTERNET","content_handling":null,"credentials":null,"http_method":"POST","integration_http_method":null,"request_parameters":null,"request_templates":null,"timeout_milliseconds":29000,"tls_config":[],"type":"MOCK","uri":null},"sensitive_values":{"tls_config":[]}},{"address":"aws_api_gateway_method.GetMethod","mode":"managed","type":"aws_api_gateway_method","name":"GetMethod","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"api_key_required":false,"authorization":"NONE","authorization_scopes":null,"authorizer_id":null,"http_method":"GET","operation_name":null,"request_models":null,"request_parameters":null,"request_validator_id":null},"sensitive_values":{}},{"address":"aws_api_gateway_method.PostMethod","mode":"managed","type":"aws_api_gateway_method","name":"PostMethod","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"api_key_required":false,"authorization":"NONE","authorization_scopes":null,"authorizer_id":null,"http_method":"POST","operation_name":null,"request_models":null,"request_parameters":null,"request_validator_id":null},"sensitive_values":{}},{"address":"aws_api_gateway_resource.MyDemoResource","mode":"managed","type":"aws_api_gateway_resource","name":"MyDemoResource","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"path_part":"hello"},"sensitive_values":{}},{"address":"aws_api_gateway_rest_api.MyDemoAPI","mode":"managed","type":"aws_api_gateway_rest_api","name":"MyDemoAPI","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"binary_media_types":["utf-8"],"body":null,"minimum_compression_size":-1,"name":"MyDemoAPI","parameters":null,"put_rest_api_mode":null,"tags":null},"sensitive_values":{"binary_media_types":[false],"endpoint_configuration":[],"tags_all":{}}},{"address":"aws_api_gateway_stage.MyDemoStage","mode":"managed","type":"aws_api_gateway_stage","name":"MyDemoStage","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"access_log_settings":[],"cache_cluster_enabled":null,"cache_cluster_size":null,"canary_settings":[],"client_certificate_id":null,"description":null,"documentation_version":null,"tags":null,"variables":null,"xray_tracing_enabled":null},"sensitive_values":{"access_log_settings":[],"canary_settings":[],"tags_all":{}}},{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"path":"/","permissions_boundary":null,"tags":null},"sensitive_values":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}},{"address":"aws_lambda_function.HelloWorldFunction","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"layers":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_lambda_function.HelloWorldFunction2","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction2","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_lambda_layer_version.MyAwesomeLayer","mode":"managed","type":"aws_lambda_layer_version","name":"MyAwesomeLayer","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"compatible_architectures":null,"compatible_runtimes":["python3.8"],"description":null,"filename":"HelloWorldFunction.zip","layer_name":"MyAwesomeLayer","license_info":null,"s3_bucket":null,"s3_key":null,"s3_object_version":null,"skip_destroy":false},"sensitive_values":{"compatible_runtimes":[false]}},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket_prefix":null,"force_destroy":false,"tags":null,"timeouts":null},"sensitive_values":{"cors_rule":[],"grant":[],"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"replication_configuration":[],"server_side_encryption_configuration":[],"tags_all":{},"versioning":[],"website":[]}},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"acl":"private","cache_control":null,"content":null,"content_base64":null,"content_disposition":null,"content_encoding":null,"content_language":null,"force_destroy":false,"key":"s3_lambda_code_key","metadata":null,"object_lock_legal_hold_status":null,"object_lock_mode":null,"object_lock_retain_until_date":null,"source":"HelloWorldFunction.zip","source_hash":null,"tags":null,"website_redirect":null},"sensitive_values":{"tags_all":{}}},{"address":"random_uuid.unique_id","mode":"managed","type":"random_uuid","name":"unique_id","provider_name":"registry.terraform.io/hashicorp/random","schema_version":0,"values":{"keepers":{"my_key":"my_key"}},"sensitive_values":{"keepers":{}}}]}},"resource_changes":[{"address":"aws_api_gateway_deployment.MyDemoDeployment","mode":"managed","type":"aws_api_gateway_deployment","name":"MyDemoDeployment","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"description":null,"stage_description":null,"stage_name":null,"variables":null},"after_unknown":{"created_date":true,"execution_arn":true,"id":true,"invoke_url":true,"rest_api_id":true,"triggers":true},"before_sensitive":false,"after_sensitive":{"triggers":{}}}},{"address":"aws_api_gateway_integration.MyDemoIntegration","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegration","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"cache_key_parameters":null,"connection_id":null,"connection_type":"INTERNET","content_handling":"CONVERT_TO_TEXT","credentials":null,"http_method":"GET","integration_http_method":"POST","request_parameters":null,"request_templates":null,"timeout_milliseconds":29000,"tls_config":[],"type":"AWS_PROXY"},"after_unknown":{"cache_namespace":true,"id":true,"passthrough_behavior":true,"resource_id":true,"rest_api_id":true,"tls_config":[],"uri":true},"before_sensitive":false,"after_sensitive":{"tls_config":[]}}},{"address":"aws_api_gateway_integration.MyDemoIntegrationMock","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegrationMock","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"cache_key_parameters":null,"connection_id":null,"connection_type":"INTERNET","content_handling":null,"credentials":null,"http_method":"POST","integration_http_method":null,"request_parameters":null,"request_templates":null,"timeout_milliseconds":29000,"tls_config":[],"type":"MOCK","uri":null},"after_unknown":{"cache_namespace":true,"id":true,"passthrough_behavior":true,"resource_id":true,"rest_api_id":true,"tls_config":[]},"before_sensitive":false,"after_sensitive":{"tls_config":[]}}},{"address":"aws_api_gateway_method.GetMethod","mode":"managed","type":"aws_api_gateway_method","name":"GetMethod","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"api_key_required":false,"authorization":"NONE","authorization_scopes":null,"authorizer_id":null,"http_method":"GET","operation_name":null,"request_models":null,"request_parameters":null,"request_validator_id":null},"after_unknown":{"id":true,"resource_id":true,"rest_api_id":true},"before_sensitive":false,"after_sensitive":{}}},{"address":"aws_api_gateway_method.PostMethod","mode":"managed","type":"aws_api_gateway_method","name":"PostMethod","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"api_key_required":false,"authorization":"NONE","authorization_scopes":null,"authorizer_id":null,"http_method":"POST","operation_name":null,"request_models":null,"request_parameters":null,"request_validator_id":null},"after_unknown":{"id":true,"resource_id":true,"rest_api_id":true},"before_sensitive":false,"after_sensitive":{}}},{"address":"aws_api_gateway_resource.MyDemoResource","mode":"managed","type":"aws_api_gateway_resource","name":"MyDemoResource","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"path_part":"hello"},"after_unknown":{"id":true,"parent_id":true,"path":true,"rest_api_id":true},"before_sensitive":false,"after_sensitive":{}}},{"address":"aws_api_gateway_rest_api.MyDemoAPI","mode":"managed","type":"aws_api_gateway_rest_api","name":"MyDemoAPI","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"binary_media_types":["utf-8"],"body":null,"minimum_compression_size":-1,"name":"MyDemoAPI","parameters":null,"put_rest_api_mode":null,"tags":null},"after_unknown":{"api_key_source":true,"arn":true,"binary_media_types":[false],"created_date":true,"description":true,"disable_execute_api_endpoint":true,"endpoint_configuration":true,"execution_arn":true,"id":true,"policy":true,"root_resource_id":true,"tags_all":true},"before_sensitive":false,"after_sensitive":{"binary_media_types":[false],"endpoint_configuration":[],"tags_all":{}}}},{"address":"aws_api_gateway_stage.MyDemoStage","mode":"managed","type":"aws_api_gateway_stage","name":"MyDemoStage","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"access_log_settings":[],"cache_cluster_enabled":null,"cache_cluster_size":null,"canary_settings":[],"client_certificate_id":null,"description":null,"documentation_version":null,"tags":null,"variables":null,"xray_tracing_enabled":null},"after_unknown":{"access_log_settings":[],"arn":true,"canary_settings":[],"deployment_id":true,"execution_arn":true,"id":true,"invoke_url":true,"rest_api_id":true,"stage_name":true,"tags_all":true,"web_acl_arn":true},"before_sensitive":false,"after_sensitive":{"access_log_settings":[],"canary_settings":[],"tags_all":{}}}},{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"path":"/","permissions_boundary":null,"tags":null},"after_unknown":{"arn":true,"create_date":true,"id":true,"inline_policy":true,"managed_policy_arns":true,"name":true,"name_prefix":true,"tags_all":true,"unique_id":true},"before_sensitive":false,"after_sensitive":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}}},{"address":"aws_lambda_function.HelloWorldFunction","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"function_name":true,"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"layers":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"s3_bucket":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"layers":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_lambda_function.HelloWorldFunction2","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction2","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.8","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"function_name":true,"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"s3_bucket":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_lambda_layer_version.MyAwesomeLayer","mode":"managed","type":"aws_lambda_layer_version","name":"MyAwesomeLayer","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"compatible_architectures":null,"compatible_runtimes":["python3.8"],"description":null,"filename":"HelloWorldFunction.zip","layer_name":"MyAwesomeLayer","license_info":null,"s3_bucket":null,"s3_key":null,"s3_object_version":null,"skip_destroy":false},"after_unknown":{"arn":true,"compatible_runtimes":[false],"created_date":true,"id":true,"layer_arn":true,"signing_job_arn":true,"signing_profile_version_arn":true,"source_code_hash":true,"source_code_size":true,"version":true},"before_sensitive":false,"after_sensitive":{"compatible_runtimes":[false]}}},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"bucket_prefix":null,"force_destroy":false,"tags":null,"timeouts":null},"after_unknown":{"acceleration_status":true,"acl":true,"arn":true,"bucket":true,"bucket_domain_name":true,"bucket_regional_domain_name":true,"cors_rule":true,"grant":true,"hosted_zone_id":true,"id":true,"lifecycle_rule":true,"logging":true,"object_lock_configuration":true,"object_lock_enabled":true,"policy":true,"region":true,"replication_configuration":true,"request_payer":true,"server_side_encryption_configuration":true,"tags_all":true,"versioning":true,"website":true,"website_domain":true,"website_endpoint":true},"before_sensitive":false,"after_sensitive":{"cors_rule":[],"grant":[],"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"replication_configuration":[],"server_side_encryption_configuration":[],"tags_all":{},"versioning":[],"website":[]}}},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"acl":"private","cache_control":null,"content":null,"content_base64":null,"content_disposition":null,"content_encoding":null,"content_language":null,"force_destroy":false,"key":"s3_lambda_code_key","metadata":null,"object_lock_legal_hold_status":null,"object_lock_mode":null,"object_lock_retain_until_date":null,"source":"HelloWorldFunction.zip","source_hash":null,"tags":null,"website_redirect":null},"after_unknown":{"bucket":true,"bucket_key_enabled":true,"content_type":true,"etag":true,"id":true,"kms_key_id":true,"server_side_encryption":true,"storage_class":true,"tags_all":true,"version_id":true},"before_sensitive":false,"after_sensitive":{"tags_all":{}}}},{"address":"random_uuid.unique_id","mode":"managed","type":"random_uuid","name":"unique_id","provider_name":"registry.terraform.io/hashicorp/random","change":{"actions":["create"],"before":null,"after":{"keepers":{"my_key":"my_key"}},"after_unknown":{"id":true,"keepers":{},"result":true},"before_sensitive":false,"after_sensitive":{"keepers":{}}}}],"configuration":{"provider_config":{"aws":{"name":"aws","full_name":"registry.terraform.io/hashicorp/aws"},"random":{"name":"random","full_name":"registry.terraform.io/hashicorp/random"}},"root_module":{"resources":[{"address":"aws_api_gateway_deployment.MyDemoDeployment","mode":"managed","type":"aws_api_gateway_deployment","name":"MyDemoDeployment","provider_config_key":"aws","expressions":{"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]},"triggers":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource","aws_api_gateway_method.GetMethod.http_method","aws_api_gateway_method.GetMethod","aws_api_gateway_integration.MyDemoIntegration.id","aws_api_gateway_integration.MyDemoIntegration"]}},"schema_version":0},{"address":"aws_api_gateway_integration.MyDemoIntegration","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegration","provider_config_key":"aws","expressions":{"content_handling":{"constant_value":"CONVERT_TO_TEXT"},"http_method":{"references":["aws_api_gateway_method.GetMethod.http_method","aws_api_gateway_method.GetMethod"]},"integration_http_method":{"constant_value":"POST"},"resource_id":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]},"type":{"constant_value":"AWS_PROXY"},"uri":{"references":["aws_lambda_function.HelloWorldFunction.invoke_arn","aws_lambda_function.HelloWorldFunction"]}},"schema_version":0,"depends_on":["aws_api_gateway_method.GetMethod"]},{"address":"aws_api_gateway_integration.MyDemoIntegrationMock","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegrationMock","provider_config_key":"aws","expressions":{"http_method":{"references":["aws_api_gateway_method.PostMethod.http_method","aws_api_gateway_method.PostMethod"]},"resource_id":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]},"type":{"constant_value":"MOCK"}},"schema_version":0},{"address":"aws_api_gateway_method.GetMethod","mode":"managed","type":"aws_api_gateway_method","name":"GetMethod","provider_config_key":"aws","expressions":{"authorization":{"constant_value":"NONE"},"http_method":{"constant_value":"GET"},"resource_id":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]}},"schema_version":0},{"address":"aws_api_gateway_method.PostMethod","mode":"managed","type":"aws_api_gateway_method","name":"PostMethod","provider_config_key":"aws","expressions":{"authorization":{"constant_value":"NONE"},"http_method":{"constant_value":"POST"},"resource_id":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]}},"schema_version":0},{"address":"aws_api_gateway_resource.MyDemoResource","mode":"managed","type":"aws_api_gateway_resource","name":"MyDemoResource","provider_config_key":"aws","expressions":{"parent_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.root_resource_id","aws_api_gateway_rest_api.MyDemoAPI"]},"path_part":{"constant_value":"hello"},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]}},"schema_version":0},{"address":"aws_api_gateway_rest_api.MyDemoAPI","mode":"managed","type":"aws_api_gateway_rest_api","name":"MyDemoAPI","provider_config_key":"aws","expressions":{"binary_media_types":{"constant_value":["utf-8"]},"name":{"constant_value":"MyDemoAPI"}},"schema_version":0},{"address":"aws_api_gateway_stage.MyDemoStage","mode":"managed","type":"aws_api_gateway_stage","name":"MyDemoStage","provider_config_key":"aws","expressions":{"deployment_id":{"references":["aws_api_gateway_deployment.MyDemoDeployment.id","aws_api_gateway_deployment.MyDemoDeployment"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]},"stage_name":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]}},"schema_version":0},{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_config_key":"aws","expressions":{"assume_role_policy":{"constant_value":"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n"},"name":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]}},"schema_version":0},{"address":"aws_lambda_function.HelloWorldFunction","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction","provider_config_key":"aws","expressions":{"function_name":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"handler":{"constant_value":"app.lambda_handler"},"layers":{"references":["aws_lambda_layer_version.MyAwesomeLayer.arn","aws_lambda_layer_version.MyAwesomeLayer"]},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.8"},"s3_bucket":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"s3_key":{"constant_value":"s3_lambda_code_key"},"timeout":{"constant_value":500}},"schema_version":0,"depends_on":["aws_s3_object.s3_lambda_code"]},{"address":"aws_lambda_function.HelloWorldFunction2","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction2","provider_config_key":"aws","expressions":{"function_name":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"handler":{"constant_value":"app.lambda_handler"},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.8"},"s3_bucket":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"s3_key":{"constant_value":"s3_lambda_code_key"},"timeout":{"constant_value":500}},"schema_version":0,"depends_on":["aws_s3_object.s3_lambda_code"]},{"address":"aws_lambda_layer_version.MyAwesomeLayer","mode":"managed","type":"aws_lambda_layer_version","name":"MyAwesomeLayer","provider_config_key":"aws","expressions":{"compatible_runtimes":{"constant_value":["python3.8"]},"filename":{"constant_value":"HelloWorldFunction.zip"},"layer_name":{"constant_value":"MyAwesomeLayer"}},"schema_version":0},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_config_key":"aws","expressions":{"bucket":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]}},"schema_version":0},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_config_key":"aws","expressions":{"bucket":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"key":{"constant_value":"s3_lambda_code_key"},"source":{"constant_value":"HelloWorldFunction.zip"}},"schema_version":0,"depends_on":["aws_s3_bucket.lambda_code_bucket"]},{"address":"random_uuid.unique_id","mode":"managed","type":"random_uuid","name":"unique_id","provider_config_key":"random","expressions":{"keepers":{"constant_value":{"my_key":"my_key"}}},"schema_version":0}]}},"relevant_attributes":[{"resource":"aws_lambda_layer_version.MyAwesomeLayer","attribute":["arn"]},{"resource":"aws_api_gateway_rest_api.MyDemoAPI","attribute":["id"]},{"resource":"aws_api_gateway_rest_api.MyDemoAPI","attribute":["root_resource_id"]},{"resource":"aws_api_gateway_resource.MyDemoResource","attribute":["id"]},{"resource":"aws_lambda_function.HelloWorldFunction","attribute":["invoke_arn"]},{"resource":"aws_api_gateway_method.GetMethod","attribute":["http_method"]},{"resource":"aws_api_gateway_integration.MyDemoIntegration","attribute":["id"]},{"resource":"aws_api_gateway_deployment.MyDemoDeployment","attribute":["id"]},{"resource":"random_uuid.unique_id","attribute":["result"]},{"resource":"aws_api_gateway_method.PostMethod","attribute":["http_method"]},{"resource":"aws_iam_role.iam_for_lambda","attribute":["arn"]}]} +{"format_version":"1.1","terraform_version":"1.4.6","planned_values":{"root_module":{"resources":[{"address":"aws_api_gateway_deployment.MyDemoDeployment","mode":"managed","type":"aws_api_gateway_deployment","name":"MyDemoDeployment","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"description":null,"stage_description":null,"stage_name":null,"variables":null},"sensitive_values":{"triggers":{}}},{"address":"aws_api_gateway_integration.MyDemoIntegration","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegration","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"cache_key_parameters":null,"connection_id":null,"connection_type":"INTERNET","content_handling":"CONVERT_TO_TEXT","credentials":null,"http_method":"GET","integration_http_method":"POST","request_parameters":null,"request_templates":null,"timeout_milliseconds":29000,"tls_config":[],"type":"AWS_PROXY"},"sensitive_values":{"tls_config":[]}},{"address":"aws_api_gateway_integration.MyDemoIntegrationMock","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegrationMock","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"cache_key_parameters":null,"connection_id":null,"connection_type":"INTERNET","content_handling":null,"credentials":null,"http_method":"POST","integration_http_method":null,"request_parameters":null,"request_templates":null,"timeout_milliseconds":29000,"tls_config":[],"type":"MOCK","uri":null},"sensitive_values":{"tls_config":[]}},{"address":"aws_api_gateway_method.GetMethod","mode":"managed","type":"aws_api_gateway_method","name":"GetMethod","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"api_key_required":false,"authorization":"NONE","authorization_scopes":null,"authorizer_id":null,"http_method":"GET","operation_name":null,"request_models":null,"request_parameters":null,"request_validator_id":null},"sensitive_values":{}},{"address":"aws_api_gateway_method.PostMethod","mode":"managed","type":"aws_api_gateway_method","name":"PostMethod","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"api_key_required":false,"authorization":"NONE","authorization_scopes":null,"authorizer_id":null,"http_method":"POST","operation_name":null,"request_models":null,"request_parameters":null,"request_validator_id":null},"sensitive_values":{}},{"address":"aws_api_gateway_resource.MyDemoResource","mode":"managed","type":"aws_api_gateway_resource","name":"MyDemoResource","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"path_part":"hello"},"sensitive_values":{}},{"address":"aws_api_gateway_rest_api.MyDemoAPI","mode":"managed","type":"aws_api_gateway_rest_api","name":"MyDemoAPI","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"binary_media_types":["utf-8"],"body":null,"minimum_compression_size":-1,"name":"MyDemoAPI","parameters":null,"put_rest_api_mode":null,"tags":null},"sensitive_values":{"binary_media_types":[false],"endpoint_configuration":[],"tags_all":{}}},{"address":"aws_api_gateway_stage.MyDemoStage","mode":"managed","type":"aws_api_gateway_stage","name":"MyDemoStage","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"access_log_settings":[],"cache_cluster_enabled":null,"cache_cluster_size":null,"canary_settings":[],"client_certificate_id":null,"description":null,"documentation_version":null,"tags":null,"variables":null,"xray_tracing_enabled":null},"sensitive_values":{"access_log_settings":[],"canary_settings":[],"tags_all":{}}},{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"path":"/","permissions_boundary":null,"tags":null},"sensitive_values":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}},{"address":"aws_lambda_function.HelloWorldFunction","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"layers":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_lambda_function.HelloWorldFunction2","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction2","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"sensitive_values":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}},{"address":"aws_lambda_layer_version.MyAwesomeLayer","mode":"managed","type":"aws_lambda_layer_version","name":"MyAwesomeLayer","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"compatible_architectures":null,"compatible_runtimes":["python3.9"],"description":null,"filename":"HelloWorldFunction.zip","layer_name":"MyAwesomeLayer","license_info":null,"s3_bucket":null,"s3_key":null,"s3_object_version":null,"skip_destroy":false},"sensitive_values":{"compatible_runtimes":[false]}},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket_prefix":null,"force_destroy":false,"tags":null,"timeouts":null},"sensitive_values":{"cors_rule":[],"grant":[],"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"replication_configuration":[],"server_side_encryption_configuration":[],"tags_all":{},"versioning":[],"website":[]}},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"acl":"private","cache_control":null,"content":null,"content_base64":null,"content_disposition":null,"content_encoding":null,"content_language":null,"force_destroy":false,"key":"s3_lambda_code_key","metadata":null,"object_lock_legal_hold_status":null,"object_lock_mode":null,"object_lock_retain_until_date":null,"source":"HelloWorldFunction.zip","source_hash":null,"tags":null,"website_redirect":null},"sensitive_values":{"tags_all":{}}},{"address":"random_uuid.unique_id","mode":"managed","type":"random_uuid","name":"unique_id","provider_name":"registry.terraform.io/hashicorp/random","schema_version":0,"values":{"keepers":{"my_key":"my_key"}},"sensitive_values":{"keepers":{}}}]}},"resource_changes":[{"address":"aws_api_gateway_deployment.MyDemoDeployment","mode":"managed","type":"aws_api_gateway_deployment","name":"MyDemoDeployment","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"description":null,"stage_description":null,"stage_name":null,"variables":null},"after_unknown":{"created_date":true,"execution_arn":true,"id":true,"invoke_url":true,"rest_api_id":true,"triggers":true},"before_sensitive":false,"after_sensitive":{"triggers":{}}}},{"address":"aws_api_gateway_integration.MyDemoIntegration","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegration","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"cache_key_parameters":null,"connection_id":null,"connection_type":"INTERNET","content_handling":"CONVERT_TO_TEXT","credentials":null,"http_method":"GET","integration_http_method":"POST","request_parameters":null,"request_templates":null,"timeout_milliseconds":29000,"tls_config":[],"type":"AWS_PROXY"},"after_unknown":{"cache_namespace":true,"id":true,"passthrough_behavior":true,"resource_id":true,"rest_api_id":true,"tls_config":[],"uri":true},"before_sensitive":false,"after_sensitive":{"tls_config":[]}}},{"address":"aws_api_gateway_integration.MyDemoIntegrationMock","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegrationMock","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"cache_key_parameters":null,"connection_id":null,"connection_type":"INTERNET","content_handling":null,"credentials":null,"http_method":"POST","integration_http_method":null,"request_parameters":null,"request_templates":null,"timeout_milliseconds":29000,"tls_config":[],"type":"MOCK","uri":null},"after_unknown":{"cache_namespace":true,"id":true,"passthrough_behavior":true,"resource_id":true,"rest_api_id":true,"tls_config":[]},"before_sensitive":false,"after_sensitive":{"tls_config":[]}}},{"address":"aws_api_gateway_method.GetMethod","mode":"managed","type":"aws_api_gateway_method","name":"GetMethod","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"api_key_required":false,"authorization":"NONE","authorization_scopes":null,"authorizer_id":null,"http_method":"GET","operation_name":null,"request_models":null,"request_parameters":null,"request_validator_id":null},"after_unknown":{"id":true,"resource_id":true,"rest_api_id":true},"before_sensitive":false,"after_sensitive":{}}},{"address":"aws_api_gateway_method.PostMethod","mode":"managed","type":"aws_api_gateway_method","name":"PostMethod","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"api_key_required":false,"authorization":"NONE","authorization_scopes":null,"authorizer_id":null,"http_method":"POST","operation_name":null,"request_models":null,"request_parameters":null,"request_validator_id":null},"after_unknown":{"id":true,"resource_id":true,"rest_api_id":true},"before_sensitive":false,"after_sensitive":{}}},{"address":"aws_api_gateway_resource.MyDemoResource","mode":"managed","type":"aws_api_gateway_resource","name":"MyDemoResource","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"path_part":"hello"},"after_unknown":{"id":true,"parent_id":true,"path":true,"rest_api_id":true},"before_sensitive":false,"after_sensitive":{}}},{"address":"aws_api_gateway_rest_api.MyDemoAPI","mode":"managed","type":"aws_api_gateway_rest_api","name":"MyDemoAPI","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"binary_media_types":["utf-8"],"body":null,"minimum_compression_size":-1,"name":"MyDemoAPI","parameters":null,"put_rest_api_mode":null,"tags":null},"after_unknown":{"api_key_source":true,"arn":true,"binary_media_types":[false],"created_date":true,"description":true,"disable_execute_api_endpoint":true,"endpoint_configuration":true,"execution_arn":true,"id":true,"policy":true,"root_resource_id":true,"tags_all":true},"before_sensitive":false,"after_sensitive":{"binary_media_types":[false],"endpoint_configuration":[],"tags_all":{}}}},{"address":"aws_api_gateway_stage.MyDemoStage","mode":"managed","type":"aws_api_gateway_stage","name":"MyDemoStage","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"access_log_settings":[],"cache_cluster_enabled":null,"cache_cluster_size":null,"canary_settings":[],"client_certificate_id":null,"description":null,"documentation_version":null,"tags":null,"variables":null,"xray_tracing_enabled":null},"after_unknown":{"access_log_settings":[],"arn":true,"canary_settings":[],"deployment_id":true,"execution_arn":true,"id":true,"invoke_url":true,"rest_api_id":true,"stage_name":true,"tags_all":true,"web_acl_arn":true},"before_sensitive":false,"after_sensitive":{"access_log_settings":[],"canary_settings":[],"tags_all":{}}}},{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}","description":null,"force_detach_policies":false,"max_session_duration":3600,"path":"/","permissions_boundary":null,"tags":null},"after_unknown":{"arn":true,"create_date":true,"id":true,"inline_policy":true,"managed_policy_arns":true,"name":true,"name_prefix":true,"tags_all":true,"unique_id":true},"before_sensitive":false,"after_sensitive":{"inline_policy":[],"managed_policy_arns":[],"tags_all":{}}}},{"address":"aws_lambda_function.HelloWorldFunction","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"function_name":true,"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"layers":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"s3_bucket":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"layers":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_lambda_function.HelloWorldFunction2","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction2","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"code_signing_config_arn":null,"dead_letter_config":[],"description":null,"environment":[],"file_system_config":[],"filename":null,"handler":"app.lambda_handler","image_config":[],"image_uri":null,"kms_key_arn":null,"layers":null,"memory_size":128,"package_type":"Zip","publish":false,"reserved_concurrent_executions":-1,"runtime":"python3.9","s3_key":"s3_lambda_code_key","s3_object_version":null,"snap_start":[],"tags":null,"timeout":500,"timeouts":null,"vpc_config":[]},"after_unknown":{"architectures":true,"arn":true,"dead_letter_config":[],"environment":[],"ephemeral_storage":true,"file_system_config":[],"function_name":true,"id":true,"image_config":[],"invoke_arn":true,"last_modified":true,"qualified_arn":true,"qualified_invoke_arn":true,"role":true,"s3_bucket":true,"signing_job_arn":true,"signing_profile_version_arn":true,"snap_start":[],"source_code_hash":true,"source_code_size":true,"tags_all":true,"tracing_config":true,"version":true,"vpc_config":[]},"before_sensitive":false,"after_sensitive":{"architectures":[],"dead_letter_config":[],"environment":[],"ephemeral_storage":[],"file_system_config":[],"image_config":[],"snap_start":[],"tags_all":{},"tracing_config":[],"vpc_config":[]}}},{"address":"aws_lambda_layer_version.MyAwesomeLayer","mode":"managed","type":"aws_lambda_layer_version","name":"MyAwesomeLayer","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"compatible_architectures":null,"compatible_runtimes":["python3.9"],"description":null,"filename":"HelloWorldFunction.zip","layer_name":"MyAwesomeLayer","license_info":null,"s3_bucket":null,"s3_key":null,"s3_object_version":null,"skip_destroy":false},"after_unknown":{"arn":true,"compatible_runtimes":[false],"created_date":true,"id":true,"layer_arn":true,"signing_job_arn":true,"signing_profile_version_arn":true,"source_code_hash":true,"source_code_size":true,"version":true},"before_sensitive":false,"after_sensitive":{"compatible_runtimes":[false]}}},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"bucket_prefix":null,"force_destroy":false,"tags":null,"timeouts":null},"after_unknown":{"acceleration_status":true,"acl":true,"arn":true,"bucket":true,"bucket_domain_name":true,"bucket_regional_domain_name":true,"cors_rule":true,"grant":true,"hosted_zone_id":true,"id":true,"lifecycle_rule":true,"logging":true,"object_lock_configuration":true,"object_lock_enabled":true,"policy":true,"region":true,"replication_configuration":true,"request_payer":true,"server_side_encryption_configuration":true,"tags_all":true,"versioning":true,"website":true,"website_domain":true,"website_endpoint":true},"before_sensitive":false,"after_sensitive":{"cors_rule":[],"grant":[],"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"replication_configuration":[],"server_side_encryption_configuration":[],"tags_all":{},"versioning":[],"website":[]}}},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_name":"registry.terraform.io/hashicorp/aws","change":{"actions":["create"],"before":null,"after":{"acl":"private","cache_control":null,"content":null,"content_base64":null,"content_disposition":null,"content_encoding":null,"content_language":null,"force_destroy":false,"key":"s3_lambda_code_key","metadata":null,"object_lock_legal_hold_status":null,"object_lock_mode":null,"object_lock_retain_until_date":null,"source":"HelloWorldFunction.zip","source_hash":null,"tags":null,"website_redirect":null},"after_unknown":{"bucket":true,"bucket_key_enabled":true,"content_type":true,"etag":true,"id":true,"kms_key_id":true,"server_side_encryption":true,"storage_class":true,"tags_all":true,"version_id":true},"before_sensitive":false,"after_sensitive":{"tags_all":{}}}},{"address":"random_uuid.unique_id","mode":"managed","type":"random_uuid","name":"unique_id","provider_name":"registry.terraform.io/hashicorp/random","change":{"actions":["create"],"before":null,"after":{"keepers":{"my_key":"my_key"}},"after_unknown":{"id":true,"keepers":{},"result":true},"before_sensitive":false,"after_sensitive":{"keepers":{}}}}],"configuration":{"provider_config":{"aws":{"name":"aws","full_name":"registry.terraform.io/hashicorp/aws"},"random":{"name":"random","full_name":"registry.terraform.io/hashicorp/random"}},"root_module":{"resources":[{"address":"aws_api_gateway_deployment.MyDemoDeployment","mode":"managed","type":"aws_api_gateway_deployment","name":"MyDemoDeployment","provider_config_key":"aws","expressions":{"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]},"triggers":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource","aws_api_gateway_method.GetMethod.http_method","aws_api_gateway_method.GetMethod","aws_api_gateway_integration.MyDemoIntegration.id","aws_api_gateway_integration.MyDemoIntegration"]}},"schema_version":0},{"address":"aws_api_gateway_integration.MyDemoIntegration","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegration","provider_config_key":"aws","expressions":{"content_handling":{"constant_value":"CONVERT_TO_TEXT"},"http_method":{"references":["aws_api_gateway_method.GetMethod.http_method","aws_api_gateway_method.GetMethod"]},"integration_http_method":{"constant_value":"POST"},"resource_id":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]},"type":{"constant_value":"AWS_PROXY"},"uri":{"references":["aws_lambda_function.HelloWorldFunction.invoke_arn","aws_lambda_function.HelloWorldFunction"]}},"schema_version":0,"depends_on":["aws_api_gateway_method.GetMethod"]},{"address":"aws_api_gateway_integration.MyDemoIntegrationMock","mode":"managed","type":"aws_api_gateway_integration","name":"MyDemoIntegrationMock","provider_config_key":"aws","expressions":{"http_method":{"references":["aws_api_gateway_method.PostMethod.http_method","aws_api_gateway_method.PostMethod"]},"resource_id":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]},"type":{"constant_value":"MOCK"}},"schema_version":0},{"address":"aws_api_gateway_method.GetMethod","mode":"managed","type":"aws_api_gateway_method","name":"GetMethod","provider_config_key":"aws","expressions":{"authorization":{"constant_value":"NONE"},"http_method":{"constant_value":"GET"},"resource_id":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]}},"schema_version":0},{"address":"aws_api_gateway_method.PostMethod","mode":"managed","type":"aws_api_gateway_method","name":"PostMethod","provider_config_key":"aws","expressions":{"authorization":{"constant_value":"NONE"},"http_method":{"constant_value":"POST"},"resource_id":{"references":["aws_api_gateway_resource.MyDemoResource.id","aws_api_gateway_resource.MyDemoResource"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]}},"schema_version":0},{"address":"aws_api_gateway_resource.MyDemoResource","mode":"managed","type":"aws_api_gateway_resource","name":"MyDemoResource","provider_config_key":"aws","expressions":{"parent_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.root_resource_id","aws_api_gateway_rest_api.MyDemoAPI"]},"path_part":{"constant_value":"hello"},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]}},"schema_version":0},{"address":"aws_api_gateway_rest_api.MyDemoAPI","mode":"managed","type":"aws_api_gateway_rest_api","name":"MyDemoAPI","provider_config_key":"aws","expressions":{"binary_media_types":{"constant_value":["utf-8"]},"name":{"constant_value":"MyDemoAPI"}},"schema_version":0},{"address":"aws_api_gateway_stage.MyDemoStage","mode":"managed","type":"aws_api_gateway_stage","name":"MyDemoStage","provider_config_key":"aws","expressions":{"deployment_id":{"references":["aws_api_gateway_deployment.MyDemoDeployment.id","aws_api_gateway_deployment.MyDemoDeployment"]},"rest_api_id":{"references":["aws_api_gateway_rest_api.MyDemoAPI.id","aws_api_gateway_rest_api.MyDemoAPI"]},"stage_name":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]}},"schema_version":0},{"address":"aws_iam_role.iam_for_lambda","mode":"managed","type":"aws_iam_role","name":"iam_for_lambda","provider_config_key":"aws","expressions":{"assume_role_policy":{"constant_value":"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n"},"name":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]}},"schema_version":0},{"address":"aws_lambda_function.HelloWorldFunction","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction","provider_config_key":"aws","expressions":{"function_name":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"handler":{"constant_value":"app.lambda_handler"},"layers":{"references":["aws_lambda_layer_version.MyAwesomeLayer.arn","aws_lambda_layer_version.MyAwesomeLayer"]},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.9"},"s3_bucket":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"s3_key":{"constant_value":"s3_lambda_code_key"},"timeout":{"constant_value":500}},"schema_version":0,"depends_on":["aws_s3_object.s3_lambda_code"]},{"address":"aws_lambda_function.HelloWorldFunction2","mode":"managed","type":"aws_lambda_function","name":"HelloWorldFunction2","provider_config_key":"aws","expressions":{"function_name":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"handler":{"constant_value":"app.lambda_handler"},"role":{"references":["aws_iam_role.iam_for_lambda.arn","aws_iam_role.iam_for_lambda"]},"runtime":{"constant_value":"python3.9"},"s3_bucket":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"s3_key":{"constant_value":"s3_lambda_code_key"},"timeout":{"constant_value":500}},"schema_version":0,"depends_on":["aws_s3_object.s3_lambda_code"]},{"address":"aws_lambda_layer_version.MyAwesomeLayer","mode":"managed","type":"aws_lambda_layer_version","name":"MyAwesomeLayer","provider_config_key":"aws","expressions":{"compatible_runtimes":{"constant_value":["python3.9"]},"filename":{"constant_value":"HelloWorldFunction.zip"},"layer_name":{"constant_value":"MyAwesomeLayer"}},"schema_version":0},{"address":"aws_s3_bucket.lambda_code_bucket","mode":"managed","type":"aws_s3_bucket","name":"lambda_code_bucket","provider_config_key":"aws","expressions":{"bucket":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]}},"schema_version":0},{"address":"aws_s3_object.s3_lambda_code","mode":"managed","type":"aws_s3_object","name":"s3_lambda_code","provider_config_key":"aws","expressions":{"bucket":{"references":["random_uuid.unique_id.result","random_uuid.unique_id"]},"key":{"constant_value":"s3_lambda_code_key"},"source":{"constant_value":"HelloWorldFunction.zip"}},"schema_version":0,"depends_on":["aws_s3_bucket.lambda_code_bucket"]},{"address":"random_uuid.unique_id","mode":"managed","type":"random_uuid","name":"unique_id","provider_config_key":"random","expressions":{"keepers":{"constant_value":{"my_key":"my_key"}}},"schema_version":0}]}},"relevant_attributes":[{"resource":"aws_lambda_layer_version.MyAwesomeLayer","attribute":["arn"]},{"resource":"aws_api_gateway_rest_api.MyDemoAPI","attribute":["id"]},{"resource":"aws_api_gateway_rest_api.MyDemoAPI","attribute":["root_resource_id"]},{"resource":"aws_api_gateway_resource.MyDemoResource","attribute":["id"]},{"resource":"aws_lambda_function.HelloWorldFunction","attribute":["invoke_arn"]},{"resource":"aws_api_gateway_method.GetMethod","attribute":["http_method"]},{"resource":"aws_api_gateway_integration.MyDemoIntegration","attribute":["id"]},{"resource":"aws_api_gateway_deployment.MyDemoDeployment","attribute":["id"]},{"resource":"random_uuid.unique_id","attribute":["result"]},{"resource":"aws_api_gateway_method.PostMethod","attribute":["http_method"]},{"resource":"aws_iam_role.iam_for_lambda","attribute":["arn"]}]} diff --git a/tests/integration/testdata/start_api/terraform/terraform-v1-api-simple/main.tf b/tests/integration/testdata/start_api/terraform/terraform-v1-api-simple/main.tf index 1e5e60d26d..c667134f95 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v1-api-simple/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-v1-api-simple/main.tf @@ -41,14 +41,14 @@ resource "aws_s3_object" "s3_lambda_code" { resource "aws_lambda_layer_version" "MyAwesomeLayer" { filename = "HelloWorldFunction.zip" layer_name = "MyAwesomeLayer_${random_uuid.unique_id.result}" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } resource "aws_lambda_function" "HelloWorldFunction" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction_${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn @@ -60,7 +60,7 @@ resource "aws_lambda_function" "HelloWorldFunction2" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction2_${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/start_api/terraform/terraform-v1-nested-apis/main.tf b/tests/integration/testdata/start_api/terraform/terraform-v1-nested-apis/main.tf index 3c2a904039..69a5ecc287 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v1-nested-apis/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-v1-nested-apis/main.tf @@ -41,14 +41,14 @@ resource "aws_s3_object" "s3_lambda_code" { resource "aws_lambda_layer_version" "MyAwesomeLayer" { filename = "HelloWorldFunction.zip" layer_name = "MyAwesomeLayer" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.9"] } resource "aws_lambda_function" "HelloWorldFunction" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction-${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn @@ -60,7 +60,7 @@ resource "aws_lambda_function" "HelloWorldFunction2" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction2-${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/start_api/terraform/terraform-v2-api-quick-create/main.tf b/tests/integration/testdata/start_api/terraform/terraform-v2-api-quick-create/main.tf index 4c96658ab6..eb65900a3d 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v2-api-quick-create/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-v2-api-quick-create/main.tf @@ -42,7 +42,7 @@ resource "aws_lambda_function" "HelloWorldFunction" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction_${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple-local-resource-link/main.tf b/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple-local-resource-link/main.tf index f2edaa9b48..0d175fa0bc 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple-local-resource-link/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple-local-resource-link/main.tf @@ -46,7 +46,7 @@ resource "aws_lambda_function" "HelloWorldFunction" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction_${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple-multi-resource-link/main.tf b/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple-multi-resource-link/main.tf index 03d3d4652d..7d2a9ed7e5 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple-multi-resource-link/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple-multi-resource-link/main.tf @@ -48,7 +48,7 @@ resource "aws_lambda_function" "HelloWorldFunction" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction_${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn @@ -59,7 +59,7 @@ resource "aws_lambda_function" "HelloWorldFunction2" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction2_${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple/main.tf b/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple/main.tf index 2fd8f84698..72160bbefb 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-v2-api-simple/main.tf @@ -42,7 +42,7 @@ resource "aws_lambda_function" "HelloWorldFunction" { s3_bucket = "lambda-code-bucket-${random_uuid.unique_id.result}" s3_key = "s3_lambda_code_key" handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" function_name = "HelloWorldFunction_${random_uuid.unique_id.result}" timeout = 500 role = aws_iam_role.iam_for_lambda.arn diff --git a/tests/integration/testdata/start_api/terraform/terraform-v2-auth-openapi/main.tf b/tests/integration/testdata/start_api/terraform/terraform-v2-auth-openapi/main.tf index 8d6c47d4ef..2ec19c1ce8 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v2-auth-openapi/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-v2-auth-openapi/main.tf @@ -13,7 +13,7 @@ resource "aws_lambda_function" "authorizer" { function_name = "authorizer-${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "handlers.auth_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } @@ -22,7 +22,7 @@ resource "aws_lambda_function" "hello_endpoint" { function_name = "hello-lambda-open-api-${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "handlers.hello_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } diff --git a/tests/integration/testdata/start_api/terraform/terraform-v2-openapi/main.tf b/tests/integration/testdata/start_api/terraform/terraform-v2-openapi/main.tf index bdc78fd634..fff41d2166 100644 --- a/tests/integration/testdata/start_api/terraform/terraform-v2-openapi/main.tf +++ b/tests/integration/testdata/start_api/terraform/terraform-v2-openapi/main.tf @@ -13,7 +13,7 @@ resource "aws_lambda_function" "hello_endpoint" { function_name = "hello-lambda-open-api-${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "app.lambda_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } diff --git a/tests/integration/testdata/start_api/terraform/v1-lambda-authorizer/main.tf b/tests/integration/testdata/start_api/terraform/v1-lambda-authorizer/main.tf index c831423a86..e6264349a4 100644 --- a/tests/integration/testdata/start_api/terraform/v1-lambda-authorizer/main.tf +++ b/tests/integration/testdata/start_api/terraform/v1-lambda-authorizer/main.tf @@ -29,7 +29,7 @@ resource "aws_lambda_function" "authorizer" { function_name = "authorizer-${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "handlers.auth_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } @@ -38,7 +38,7 @@ resource "aws_lambda_function" "hello_endpoint" { function_name = "hello_lambda-${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "handlers.hello_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } diff --git a/tests/integration/testdata/start_api/terraform/v2-lambda-authorizer/main.tf b/tests/integration/testdata/start_api/terraform/v2-lambda-authorizer/main.tf index 3daff8ff59..ea8d0904da 100644 --- a/tests/integration/testdata/start_api/terraform/v2-lambda-authorizer/main.tf +++ b/tests/integration/testdata/start_api/terraform/v2-lambda-authorizer/main.tf @@ -11,7 +11,7 @@ resource "aws_lambda_function" "authorizer" { function_name = "authorizer-${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "handlers.auth_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } @@ -20,7 +20,7 @@ resource "aws_lambda_function" "hello_endpoint" { function_name = "hello_lambda-${random_uuid.unique_id.result}" role = aws_iam_role.invocation_role.arn handler = "handlers.hello_handler" - runtime = "python3.8" + runtime = "python3.9" source_code_hash = filebase64sha256("lambda-functions.zip") } diff --git a/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_level3_nested_zip_functions.json b/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_level3_nested_zip_functions.json index fb2276fdda..c77fae6920 100644 --- a/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_level3_nested_zip_functions.json +++ b/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_level3_nested_zip_functions.json @@ -42,7 +42,7 @@ } }, "CompatibleRuntimes": [ - "python3.8", + "python3.9", "python3.9", "python3.11", "python3.12" diff --git a/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_level3_nested_zip_functions_after.json b/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_level3_nested_zip_functions_after.json index 3e791a6c77..6dd45a33cf 100644 --- a/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_level3_nested_zip_functions_after.json +++ b/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_level3_nested_zip_functions_after.json @@ -42,7 +42,7 @@ } }, "CompatibleRuntimes": [ - "python3.8", + "python3.9", "python3.9", "python3.11", "python3.12" diff --git a/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_zip_functions.json b/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_zip_functions.json index 1e3018c8dd..f858fa1f5f 100644 --- a/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_zip_functions.json +++ b/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_zip_functions.json @@ -42,7 +42,7 @@ } }, "CompatibleRuntimes": [ - "python3.8", + "python3.9", "python3.9", "python3.11", "python3.12" diff --git a/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_zip_functions_after.json b/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_zip_functions_after.json index 6fdae972ec..f2d957f3b9 100644 --- a/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_zip_functions_after.json +++ b/tests/integration/testdata/sync/infra/cdk/cdk_v1_synthesized_template_zip_functions_after.json @@ -42,7 +42,7 @@ } }, "CompatibleRuntimes": [ - "python3.8", + "python3.9", "python3.9", "python3.11", "python3.12" diff --git a/tests/unit/commands/local/lib/test_sam_layer_provider.py b/tests/unit/commands/local/lib/test_sam_layer_provider.py index 7ab5f67d1f..1bea207a77 100644 --- a/tests/unit/commands/local/lib/test_sam_layer_provider.py +++ b/tests/unit/commands/local/lib/test_sam_layer_provider.py @@ -17,27 +17,27 @@ class TestSamLayerProvider(TestCase): "Properties": { "LayerName": "Layer1", "ContentUri": "PyLayer/", - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, - "Metadata": {"BuildMethod": "python3.8"}, + "Metadata": {"BuildMethod": "python3.9"}, }, "LambdaLayer": { "Type": "AWS::Lambda::LayerVersion", "Properties": { "LayerName": "Layer1", "Content": "PyLayer/", - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, - "Metadata": {"BuildMethod": "python3.8"}, + "Metadata": {"BuildMethod": "python3.9"}, }, "LambdaLayerWithCustomId": { "Type": "AWS::Lambda::LayerVersion", "Properties": { "LayerName": "Layer1", "Content": "PyLayer/", - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, - "Metadata": {"BuildMethod": "python3.8", "SamResourceId": "LambdaLayerWithCustomId-x"}, + "Metadata": {"BuildMethod": "python3.9", "SamResourceId": "LambdaLayerWithCustomId-x"}, }, "CDKLambdaLayer": { "Type": "AWS::Lambda::LayerVersion", @@ -47,10 +47,10 @@ class TestSamLayerProvider(TestCase): "S3Bucket": "bucket", "S3Key": "key", }, - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, "Metadata": { - "BuildMethod": "python3.8", + "BuildMethod": "python3.9", "aws:cdk:path": "stack/CDKLambdaLayer-x/Resource", "aws:asset:path": "PyLayer/", "aws:asset:property": "Content", @@ -61,7 +61,7 @@ class TestSamLayerProvider(TestCase): "Properties": { "LayerName": "Layer1", "ContentUri": "PyLayer/", - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, }, "LambdaLayerNoBuild": { @@ -69,7 +69,7 @@ class TestSamLayerProvider(TestCase): "Properties": { "LayerName": "Layer1", "Content": "PyLayer/", - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, }, "ServerlessLayerS3Content": { @@ -77,7 +77,7 @@ class TestSamLayerProvider(TestCase): "Properties": { "LayerName": "Layer1", "ContentUri": "s3://dummy-bucket/my-layer.zip", - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, }, "LambdaLayerS3Content": { @@ -85,7 +85,7 @@ class TestSamLayerProvider(TestCase): "Properties": { "LayerName": "Layer1", "Content": {"S3Bucket": "dummy-bucket", "S3Key": "layer.zip"}, - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, }, "SamFunc": { @@ -113,9 +113,9 @@ class TestSamLayerProvider(TestCase): "Properties": { "LayerName": "Layer1", "ContentUri": "PyLayer", - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, - "Metadata": {"BuildMethod": "python3.8"}, + "Metadata": {"BuildMethod": "python3.9"}, }, "CDKLambdaLayerInChild": { "Type": "AWS::Lambda::LayerVersion", @@ -125,10 +125,10 @@ class TestSamLayerProvider(TestCase): "S3Bucket": "bucket", "S3Key": "key", }, - "CompatibleRuntimes": ["python3.8", "python3.9"], + "CompatibleRuntimes": ["python3.9"], }, "Metadata": { - "BuildMethod": "python3.8", + "BuildMethod": "python3.9", "aws:cdk:path": "stack/CDKLambdaLayerInChild-x/Resource", "aws:asset:path": "PyLayer/", "aws:asset:property": "Content", @@ -155,8 +155,8 @@ def setUp(self): LayerVersion( "ServerlessLayer", "PyLayer", - ["python3.8", "python3.9"], - {"BuildMethod": "python3.8", "SamResourceId": "ServerlessLayer"}, + ["python3.9"], + {"BuildMethod": "python3.9", "SamResourceId": "ServerlessLayer"}, stack_path="", ), ), @@ -165,8 +165,8 @@ def setUp(self): LayerVersion( "LambdaLayer", "PyLayer", - ["python3.8", "python3.9"], - {"BuildMethod": "python3.8", "SamResourceId": "LambdaLayer"}, + ["python3.9"], + {"BuildMethod": "python3.9", "SamResourceId": "LambdaLayer"}, stack_path="", ), ), @@ -175,7 +175,7 @@ def setUp(self): LayerVersion( "ServerlessLayerNoBuild", "PyLayer", - ["python3.8", "python3.9"], + ["python3.9"], {"SamResourceId": "ServerlessLayerNoBuild"}, stack_path="", ), @@ -185,7 +185,7 @@ def setUp(self): LayerVersion( "LambdaLayerNoBuild", "PyLayer", - ["python3.8", "python3.9"], + ["python3.9"], {"SamResourceId": "LambdaLayerNoBuild"}, stack_path="", ), @@ -197,8 +197,8 @@ def setUp(self): LayerVersion( "SamLayerInChild", os.path.join("child", "PyLayer"), - ["python3.8", "python3.9"], - {"BuildMethod": "python3.8", "SamResourceId": "SamLayerInChild"}, + ["python3.9"], + {"BuildMethod": "python3.9", "SamResourceId": "SamLayerInChild"}, stack_path="ChildStack", ), ), @@ -207,8 +207,8 @@ def setUp(self): LayerVersion( "LambdaLayerWithCustomId", "PyLayer", - ["python3.8", "python3.9"], - {"BuildMethod": "python3.8", "SamResourceId": "LambdaLayerWithCustomId-x"}, + ["python3.9"], + {"BuildMethod": "python3.9", "SamResourceId": "LambdaLayerWithCustomId-x"}, stack_path="", ), ), @@ -217,8 +217,8 @@ def setUp(self): LayerVersion( "LambdaLayerWithCustomId", "PyLayer", - ["python3.8", "python3.9"], - {"BuildMethod": "python3.8", "SamResourceId": "LambdaLayerWithCustomId-x"}, + ["python3.9"], + {"BuildMethod": "python3.9", "SamResourceId": "LambdaLayerWithCustomId-x"}, stack_path="", ), ), @@ -227,9 +227,9 @@ def setUp(self): LayerVersion( "CDKLambdaLayer", "PyLayer", - ["python3.8", "python3.9"], + ["python3.9"], { - "BuildMethod": "python3.8", + "BuildMethod": "python3.9", "aws:cdk:path": "stack/CDKLambdaLayer-x/Resource", "aws:asset:path": "PyLayer/", "aws:asset:property": "Content", @@ -244,9 +244,9 @@ def setUp(self): LayerVersion( "CDKLambdaLayer", "PyLayer", - ["python3.8", "python3.9"], + ["python3.9"], { - "BuildMethod": "python3.8", + "BuildMethod": "python3.9", "aws:cdk:path": "stack/CDKLambdaLayer-x/Resource", "aws:asset:path": "PyLayer/", "aws:asset:property": "Content", @@ -261,9 +261,9 @@ def setUp(self): LayerVersion( "CDKLambdaLayerInChild", os.path.join("child", "PyLayer"), - ["python3.8", "python3.9"], + ["python3.9"], { - "BuildMethod": "python3.8", + "BuildMethod": "python3.9", "aws:cdk:path": "stack/CDKLambdaLayerInChild-x/Resource", "aws:asset:path": "PyLayer/", "aws:asset:property": "Content", @@ -278,9 +278,9 @@ def setUp(self): LayerVersion( "CDKLambdaLayerInChild", os.path.join("child", "PyLayer"), - ["python3.8", "python3.9"], + ["python3.9"], { - "BuildMethod": "python3.8", + "BuildMethod": "python3.9", "aws:cdk:path": "stack/CDKLambdaLayerInChild-x/Resource", "aws:asset:path": "PyLayer/", "aws:asset:property": "Content", @@ -295,9 +295,9 @@ def setUp(self): LayerVersion( "CDKLambdaLayerInChild", os.path.join("child", "PyLayer"), - ["python3.8", "python3.9"], + ["python3.9"], { - "BuildMethod": "python3.8", + "BuildMethod": "python3.9", "aws:cdk:path": "stack/CDKLambdaLayerInChild-x/Resource", "aws:asset:path": "PyLayer/", "aws:asset:property": "Content", diff --git a/tests/unit/lib/build_module/test_app_builder.py b/tests/unit/lib/build_module/test_app_builder.py index bc654572fb..cdd4717b47 100644 --- a/tests/unit/lib/build_module/test_app_builder.py +++ b/tests/unit/lib/build_module/test_app_builder.py @@ -32,6 +32,7 @@ from samcli.lib.utils.packagetype import IMAGE, ZIP from samcli.lib.utils.stream_writer import StreamWriter from samcli.local.docker.manager import DockerImagePullFailedException +from samcli.local.docker.container import ContainerContext from tests.unit.lib.build_module.test_build_graph import generate_function @@ -2940,7 +2941,7 @@ def mock_wait_for_logs(stdout, stderr): build_dir="/build/dir", ) - self.container_manager.run.assert_called_with(container_mock) + self.container_manager.run.assert_called_with(container_mock, context=ContainerContext.BUILD) self.builder._parse_builder_response.assert_called_once_with(stdout_data, container_mock.image) container_mock.copy.assert_called_with(response["result"]["artifacts_dir"] + "/.", "artifacts_dir") self.container_manager.stop.assert_called_with(container_mock) diff --git a/tests/unit/local/docker/test_container.py b/tests/unit/local/docker/test_container.py index b181ce33fa..e2e4a84576 100644 --- a/tests/unit/local/docker/test_container.py +++ b/tests/unit/local/docker/test_container.py @@ -16,6 +16,7 @@ from samcli.lib.utils.stream_writer import StreamWriter from samcli.local.docker.container import ( Container, + ContainerContext, ContainerResponseException, ContainerConnectionTimeoutException, PortAlreadyInUse, @@ -76,6 +77,7 @@ def setUp(self): self.additional_volumes = {"/somepath": {"blah": "blah value"}} self.container_host = "localhost" self.container_host_interface = "127.0.0.1" + self.container_context = ContainerContext.BUILD self.mock_docker_client = Mock() self.mock_docker_client.containers = Mock() @@ -104,7 +106,7 @@ def test_must_create_container_with_required_values(self, mock_resolve_symlinks) exposed_ports=self.exposed_ports, ) - container_id = container.create() + container_id = container.create(ContainerContext.INVOKE) self.assertEqual(container_id, generated_id) self.assertEqual(container.id, generated_id) @@ -121,6 +123,7 @@ def test_must_create_container_with_required_values(self, mock_resolve_symlinks) use_config_proxy=True, ) self.mock_docker_client.networks.get.assert_not_called() + mock_resolve_symlinks.assert_called_with() # When context is INVOKE @patch("samcli.local.docker.container.Container._create_mapped_symlink_files") def test_must_create_container_including_all_optional_values(self, mock_resolve_symlinks): @@ -155,7 +158,7 @@ def test_must_create_container_including_all_optional_values(self, mock_resolve_ container_host_interface=self.container_host_interface, ) - container_id = container.create() + container_id = container.create(ContainerContext.BUILD) self.assertEqual(container_id, generated_id) self.assertEqual(container.id, generated_id) @@ -176,6 +179,7 @@ def test_must_create_container_including_all_optional_values(self, mock_resolve_ container="opts", ) self.mock_docker_client.networks.get.assert_not_called() + mock_resolve_symlinks.assert_not_called() # When context is BUILD @patch("samcli.local.docker.utils.os") @patch("samcli.local.docker.container.Container._create_mapped_symlink_files") @@ -216,7 +220,7 @@ def test_must_create_container_translate_volume_path(self, mock_resolve_symlinks additional_volumes=additional_volumes, ) - container_id = container.create() + container_id = container.create(self.container_context) self.assertEqual(container_id, generated_id) self.assertEqual(container.id, generated_id) @@ -261,7 +265,7 @@ def test_must_connect_to_network_on_create(self, mock_resolve_symlinks): container.network_id = network_id - container_id = container.create() + container_id = container.create(self.container_context) self.assertEqual(container_id, generated_id) self.mock_docker_client.containers.create.assert_called_with( @@ -300,7 +304,7 @@ def test_must_connect_to_host_network_on_create(self, mock_resolve_symlinks): container.network_id = network_id - container_id = container.create() + container_id = container.create(self.container_context) self.assertEqual(container_id, generated_id) self.mock_docker_client.containers.create.assert_called_with( @@ -324,7 +328,7 @@ def test_must_fail_if_already_created(self): container.is_created.return_value = True with self.assertRaises(RuntimeError): - container.create() + container.create(self.container_context) class TestContainer_stop(TestCase): diff --git a/tests/unit/local/docker/test_lambda_image.py b/tests/unit/local/docker/test_lambda_image.py index e5a526a1e1..a28f2b19de 100644 --- a/tests/unit/local/docker/test_lambda_image.py +++ b/tests/unit/local/docker/test_lambda_image.py @@ -22,8 +22,10 @@ class TestRuntime(TestCase): ("nodejs18.x", "nodejs:18-x86_64"), ("nodejs20.x", "nodejs:20-x86_64"), ("nodejs22.x", "nodejs:22-x86_64"), - ("python3.8", "python:3.8-x86_64"), ("python3.9", "python:3.9-x86_64"), + ("python3.10", "python:3.10-x86_64"), + ("python3.11", "python:3.11-x86_64"), + ("python3.12", "python:3.12-x86_64"), ("ruby3.2", "ruby:3.2-x86_64"), ("java8.al2", "java:8.al2-x86_64"), ("java11", "java:11-x86_64"), @@ -253,7 +255,7 @@ def test_not_building_image_that_is_up_to_date( @parameterized.expand( [ ("python3.12", "python:3.12-x86_64", "public.ecr.aws/lambda/python:3.12-x86_64"), - ("python3.8", "python:3.8-x86_64", "public.ecr.aws/lambda/python:3.8-x86_64"), + ("python3.9", "python:3.9-x86_64", "public.ecr.aws/lambda/python:3.9-x86_64"), ] ) @patch("samcli.local.docker.lambda_image.LambdaImage._build_image") @@ -293,7 +295,7 @@ def test_force_building_image_that_doesnt_already_exists( @parameterized.expand( [ ("python3.12", "python:3.12-x86_64", "public.ecr.aws/lambda/python:3.12-x86_64"), - ("python3.8", "python:3.8-x86_64", "public.ecr.aws/lambda/python:3.8-x86_64"), + ("python3.9", "python:3.9-x86_64", "public.ecr.aws/lambda/python:3.9-x86_64"), ] ) @patch("samcli.local.docker.lambda_image.LambdaImage._build_image") @@ -333,7 +335,7 @@ def test_force_building_image_on_daemon_404( @parameterized.expand( [ ("python3.12", "python:3.12-x86_64", "public.ecr.aws/lambda/python:3.12-x86_64"), - ("python3.8", "python:3.8-x86_64", "public.ecr.aws/lambda/python:3.8-x86_64"), + ("python3.9", "python:3.9-x86_64", "public.ecr.aws/lambda/python:3.9-x86_64"), ] ) @patch("samcli.local.docker.lambda_image.LambdaImage._build_image") @@ -359,7 +361,7 @@ def test_docker_distribution_api_error_on_daemon_api_error( @parameterized.expand( [ ("python3.12", "python:3.12-arm64", "public.ecr.aws/lambda/python:3.12-arm64"), - ("python3.8", "python:3.8-arm64", "public.ecr.aws/lambda/python:3.8-arm64"), + ("python3.9", "python:3.9-arm64", "public.ecr.aws/lambda/python:3.9-arm64"), ] ) @patch("samcli.local.docker.lambda_image.LambdaImage._build_image") @@ -627,8 +629,8 @@ def test_build_image_fails_with_ApiError( docker_full_path_mock.unlink.assert_called_once() def test_building_new_rapid_image_removes_old_rapid_images(self): - old_repo = "public.ecr.aws/sam/emulation-python3.8" - repo = "public.ecr.aws/lambda/python:3.8" + old_repo = "public.ecr.aws/sam/emulation-python3.9" + repo = "public.ecr.aws/lambda/python:3.9" docker_client_mock = Mock() docker_client_mock.api.build.return_value = ["mock"] docker_client_mock.images.get.side_effect = ImageNotFound("image not found") @@ -648,7 +650,7 @@ def test_building_new_rapid_image_removes_old_rapid_images(self): lambda_image = LambdaImage(layer_downloader_mock, False, False, docker_client=docker_client_mock) self.assertEqual( - lambda_image.build("python3.8", ZIP, None, [], X86_64, function_name="function"), + lambda_image.build("python3.9", ZIP, None, [], X86_64, function_name="function"), f"{repo}-{RAPID_IMAGE_TAG_PREFIX}-x86_64", ) @@ -693,8 +695,8 @@ def test_building_new_rapid_image_removes_old_rapid_images_for_image_function(se ) def test_building_existing_rapid_image_does_not_remove_old_rapid_images(self): - old_repo = "public.ecr.aws/sam/emulation-python3.8" - repo = "public.ecr.aws/lambda/python:3.8" + old_repo = "public.ecr.aws/sam/emulation-python3.9" + repo = "public.ecr.aws/lambda/python:3.9" docker_client_mock = Mock() docker_client_mock.api.build.return_value = ["mock"] docker_client_mock.images.list.return_value = [ @@ -709,7 +711,7 @@ def test_building_existing_rapid_image_does_not_remove_old_rapid_images(self): lambda_image.is_base_image_current = Mock(return_value=True) self.assertEqual( - lambda_image.build("python3.8", ZIP, None, [], X86_64, function_name="function"), + lambda_image.build("python3.9", ZIP, None, [], X86_64, function_name="function"), f"{repo}-{RAPID_IMAGE_TAG_PREFIX}-x86_64", ) @@ -727,9 +729,8 @@ def test_building_existing_rapid_image_does_not_remove_old_rapid_images(self): ("public.ecr.aws/sam/emulation-python3.9:rapid", False), ("public.ecr.aws/sam/emulation-python3.9:rapid-1.29.0", True), ("public.ecr.aws/lambda/python:3.9-rapid-arm64", True), - ("public.ecr.aws/lambda/python:3.8.v1-rapid-x86_64", True), + ("public.ecr.aws/lambda/python:3.9.v1-rapid-x86_64", True), ("public.ecr.aws/lambda/java:11-rapid-x86_64", True), - ("public.ecr.aws/lambda/python:3.8", False), ("public.ecr.aws/lambda/latest", False), ] ) diff --git a/tests/unit/local/docker/test_manager.py b/tests/unit/local/docker/test_manager.py index 231f1c49b8..f86ad73a3c 100644 --- a/tests/unit/local/docker/test_manager.py +++ b/tests/unit/local/docker/test_manager.py @@ -11,6 +11,7 @@ import docker from samcli.local.docker.manager import ContainerManager, DockerImagePullFailedException +from samcli.local.docker.container import ContainerContext from samcli.local.docker.lambda_image import RAPID_IMAGE_TAG_PREFIX from parameterized import parameterized @@ -53,6 +54,7 @@ def setUp(self): def test_must_pull_image_and_run_container(self): input_data = "input data" + context = ContainerContext.BUILD self.manager.has_image = Mock() self.manager.pull_image = Mock() @@ -61,7 +63,7 @@ def test_must_pull_image_and_run_container(self): self.manager.has_image.return_value = False self.container_mock.is_created.return_value = False - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) self.manager.has_image.assert_called_with(self.image_name) self.manager.pull_image.assert_called_with(self.image_name) @@ -69,6 +71,7 @@ def test_must_pull_image_and_run_container(self): def test_must_pull_image_if_image_exist_and_no_skip(self): input_data = "input data" + context = ContainerContext.BUILD self.manager.has_image = Mock() self.manager.pull_image = Mock() @@ -79,7 +82,7 @@ def test_must_pull_image_if_image_exist_and_no_skip(self): self.manager.skip_pull_image = False self.container_mock.is_created.return_value = False - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) self.manager.has_image.assert_called_with(self.image_name) self.manager.pull_image.assert_called_with(self.image_name) @@ -87,6 +90,7 @@ def test_must_pull_image_if_image_exist_and_no_skip(self): def test_must_not_pull_image_if_image_is_samcli_lambda_image(self): input_data = "input data" + context = ContainerContext.BUILD self.manager.has_image = Mock() self.manager.pull_image = Mock() @@ -99,7 +103,7 @@ def test_must_not_pull_image_if_image_is_samcli_lambda_image(self): self.container_mock.image = "samcli/lambda" self.container_mock.is_created.return_value = False - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) self.manager.has_image.assert_called_with("samcli/lambda") self.manager.pull_image.assert_not_called() @@ -107,6 +111,7 @@ def test_must_not_pull_image_if_image_is_samcli_lambda_image(self): def test_must_not_pull_image_if_image_is_rapid_image(self): input_data = "input data" + context = ContainerContext.BUILD rapid_image_name = f"Mock_image_name/python:3.9-{RAPID_IMAGE_TAG_PREFIX}-x86_64" self.manager.has_image = Mock() @@ -120,7 +125,7 @@ def test_must_not_pull_image_if_image_is_rapid_image(self): self.container_mock.image = rapid_image_name self.container_mock.is_created.return_value = False - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) self.manager.has_image.assert_called_with(rapid_image_name) self.manager.pull_image.assert_not_called() @@ -128,6 +133,7 @@ def test_must_not_pull_image_if_image_is_rapid_image(self): def test_must_not_pull_image_if_asked_to_skip(self): input_data = "input data" + context = ContainerContext.BUILD self.manager.has_image = Mock() self.manager.pull_image = Mock() @@ -138,7 +144,7 @@ def test_must_not_pull_image_if_asked_to_skip(self): self.manager.skip_pull_image = True self.container_mock.is_created.return_value = False - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) self.manager.has_image.assert_called_with(self.image_name) # Must not call pull_image @@ -147,6 +153,7 @@ def test_must_not_pull_image_if_asked_to_skip(self): def test_must_fail_if_image_pull_failed_and_image_does_not_exist(self): input_data = "input data" + context = ContainerContext.BUILD self.manager.has_image = Mock() self.manager.pull_image = Mock(side_effect=DockerImagePullFailedException("Failed to pull image")) @@ -158,7 +165,7 @@ def test_must_fail_if_image_pull_failed_and_image_does_not_exist(self): self.container_mock.is_created.return_value = False with self.assertRaises(DockerImagePullFailedException): - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) self.manager.has_image.assert_called_with(self.image_name) self.manager.pull_image.assert_called_with(self.image_name) @@ -166,6 +173,7 @@ def test_must_fail_if_image_pull_failed_and_image_does_not_exist(self): def test_must_run_if_image_pull_failed_and_image_does_exist(self): input_data = "input data" + context = ContainerContext.BUILD self.manager.has_image = Mock() self.manager.pull_image = Mock(side_effect=DockerImagePullFailedException("Failed to pull image")) @@ -176,7 +184,7 @@ def test_must_run_if_image_pull_failed_and_image_does_exist(self): self.manager.skip_pull_image = False self.container_mock.is_created.return_value = False - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) self.manager.has_image.assert_called_with(self.image_name) self.manager.pull_image.assert_called_with(self.image_name) @@ -184,26 +192,28 @@ def test_must_run_if_image_pull_failed_and_image_does_exist(self): def test_must_create_container_if_not_exists(self): input_data = "input data" + context = ContainerContext.BUILD self.manager.has_image = Mock() self.manager.pull_image = Mock() # Assume container does NOT exist self.container_mock.is_created.return_value = False - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) # Container should be created - self.container_mock.create.assert_called_with() + self.container_mock.create.assert_called_with(context) def test_must_not_create_container_if_it_already_exists(self): input_data = "input data" + context = ContainerContext.BUILD self.manager.has_image = Mock() self.manager.pull_image = Mock() # Assume container does NOT exist self.container_mock.is_created.return_value = True - self.manager.run(self.container_mock, input_data) + self.manager.run(self.container_mock, context, input_data) # Container should be created self.container_mock.create.assert_not_called() diff --git a/tests/unit/local/lambdafn/test_runtime.py b/tests/unit/local/lambdafn/test_runtime.py index c7eb7883a7..7f33f0c66e 100644 --- a/tests/unit/local/lambdafn/test_runtime.py +++ b/tests/unit/local/lambdafn/test_runtime.py @@ -11,6 +11,7 @@ from samcli.local.lambdafn.env_vars import EnvironmentVariables from samcli.local.lambdafn.runtime import LambdaRuntime, _unzip_file, WarmLambdaRuntime, _require_container_reloading from samcli.local.lambdafn.config import FunctionConfig +from samcli.local.docker.container import ContainerContext class LambdaRuntime_create(TestCase): @@ -95,7 +96,7 @@ def test_must_create_lambda_container(self, LambdaContainerMock, LogMock): function_full_path=self.full_path, ) # Run the container and get results - self.manager_mock.create.assert_called_with(container) + self.manager_mock.create.assert_called_with(container, ContainerContext.INVOKE) @patch("samcli.local.lambdafn.runtime.LambdaContainer") def test_keyboard_interrupt_must_raise(self, LambdaContainerMock): @@ -166,7 +167,7 @@ def test_must_log_if_template_has_runtime_version(self, LambdaContainerMock, Log function_full_path=self.full_path, ) # Run the container and get results - self.manager_mock.create.assert_called_with(container) + self.manager_mock.create.assert_called_with(container, ContainerContext.INVOKE) class LambdaRuntime_run(TestCase): @@ -212,7 +213,7 @@ def test_must_run_passed_container(self): self.runtime = LambdaRuntime(self.manager_mock, lambda_image_mock) self.runtime.run(container, self.func_config, debug_context=debug_options) - self.manager_mock.run.assert_called_with(container) + self.manager_mock.run.assert_called_with(container, ContainerContext.INVOKE) def test_must_create_container_first_if_passed_container_is_none(self): container = Mock() @@ -233,7 +234,7 @@ def test_must_create_container_first_if_passed_container_is_none(self): container_host_interface=None, extra_hosts=None, ) - self.manager_mock.run.assert_called_with(container) + self.manager_mock.run.assert_called_with(container, ContainerContext.INVOKE) def test_must_skip_run_running_container(self): container = Mock() @@ -352,7 +353,7 @@ def test_must_run_container_and_wait_for_result(self, LambdaContainerMock): ) # Run the container and get results - self.manager_mock.run.assert_called_with(container) + self.manager_mock.run.assert_called_with(container, ContainerContext.INVOKE) self.runtime._configure_interrupt.assert_called_with(self.full_path, self.DEFAULT_TIMEOUT, container, True) container.wait_for_result.assert_called_with( event=event, full_path=self.full_path, stdout=stdout, stderr=stderr, start_timer=start_timer @@ -392,7 +393,7 @@ def test_exception_from_run_must_trigger_cleanup(self, LambdaContainerMock): self.runtime.invoke(self.func_config, event, debug_context=None, stdout=stdout, stderr=stderr) # Run the container and get results - self.manager_mock.run.assert_called_with(container) + self.manager_mock.run.assert_called_with(container, ContainerContext.INVOKE) self.runtime._configure_interrupt.assert_not_called() @@ -430,7 +431,7 @@ def test_exception_from_wait_for_result_must_trigger_cleanup(self, LambdaContain self.runtime.invoke(self.func_config, event, debug_context=debug_options, stdout=stdout, stderr=stderr) # Run the container and get results - self.manager_mock.run.assert_called_with(container) + self.manager_mock.run.assert_called_with(container, ContainerContext.INVOKE) self.runtime._configure_interrupt.assert_called_with(self.full_path, self.DEFAULT_TIMEOUT, container, True) @@ -464,7 +465,7 @@ def test_keyboard_interrupt_must_not_raise(self, LambdaContainerMock): self.runtime.invoke(self.func_config, event, stdout=stdout, stderr=stderr) # Run the container and get results - self.manager_mock.run.assert_called_with(container) + self.manager_mock.run.assert_called_with(container, ContainerContext.INVOKE) self.runtime._configure_interrupt.assert_not_called() @@ -713,7 +714,7 @@ def test_must_run_container_then_wait_for_result_and_container_not_stopped( ) # Run the container and get results - self.manager_mock.run.assert_called_with(container) + self.manager_mock.run.assert_called_with(container, ContainerContext.INVOKE) self.runtime._configure_interrupt.assert_called_with(self.full_path, self.DEFAULT_TIMEOUT, container, True) container.wait_for_result.assert_called_with( event=event, full_path=self.full_path, stdout=stdout, stderr=stderr, start_timer=start_timer @@ -814,7 +815,7 @@ def test_must_create_non_cached_container(self, LambdaContainerMock, LambdaFunct function_full_path=self.full_path, ) - self.manager_mock.create.assert_called_with(container) + self.manager_mock.create.assert_called_with(container, ContainerContext.INVOKE) # validate that the created container got cached self.assertEqual(self.runtime._containers[self.full_path], container) lambda_function_observer_mock.watch.assert_called_with(self.func_config) @@ -881,7 +882,9 @@ def test_must_create_incase_function_config_changed(self, LambdaContainerMock, L ] ) - self.manager_mock.create.assert_has_calls([call(container), call(container2)]) + self.manager_mock.create.assert_has_calls( + [call(container, ContainerContext.INVOKE), call(container2, ContainerContext.INVOKE)] + ) self.manager_mock.stop.assert_called_with(container) # validate that the created container got cached self.assertEqual(self.runtime._containers[self.full_path], container2) @@ -907,7 +910,7 @@ def test_must_return_cached_container(self, LambdaContainerMock, LambdaFunctionO result = self.runtime.create(self.func_config, debug_context=debug_options) # validate that the manager.create method got called only one time - self.manager_mock.create.assert_called_once_with(container) + self.manager_mock.create.assert_called_once_with(container, ContainerContext.INVOKE) self.assertEqual(result, container) @patch("samcli.local.lambdafn.runtime.LambdaFunctionObserver") @@ -950,7 +953,7 @@ def test_must_ignore_debug_options_if_function_name_is_not_debug_function( extra_hosts=None, function_full_path=self.full_path, ) - self.manager_mock.create.assert_called_with(container) + self.manager_mock.create.assert_called_with(container, ContainerContext.INVOKE) # validate that the created container got cached self.assertEqual(self.runtime._containers[self.full_path], container)