Skip to content

Commit

Permalink
fix: remove python3.7 lambda support (#6689)
Browse files Browse the repository at this point in the history
* fix: remove python3.7 lambda support

* fix: update cdk template

* use py311

* change numpy version depending on py version

* fix numpy in cdk

* fix numpy requirement

* update runtimes in templates

* update build image

* add latest prefix

* use public ecr image

* use 3.11 image

* fix quotes

* use ecr image

* use image from public ecr

* change checking exception

* update assertions

* chore(deps-dev): Update pytest, pytest-metadata, and changed to pytest-json-report-wip (#6648)

* chore(deps-dev): bump pytest-metadata in /requirements

Bumps [pytest-metadata](https://github.com/pytest-dev/pytest-metadata) from 2.0.4 to 3.1.0.
- [Changelog](https://github.com/pytest-dev/pytest-metadata/blob/master/CHANGES.rst)
- [Commits](pytest-dev/pytest-metadata@v2.0.4...3.1.0)

---
updated-dependencies:
- dependency-name: pytest-metadata
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump pytest to v8 and switch json-report to fork

* Added comment

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Deprecate Nodejs12 and Nodejs14 (#6664)

* chore: Deprecate Nodejs12 and Nodejs14

* Make Windows container tests Node18

* chore: Remove ruby27 (#6674)

* Remove ruby2.7 support

* Remove ruby2.7 build cmd integ tests

* Update validate integ test to include ruby3.2

* chore(deps): bump pydantic from 2.6.0 to 2.6.1 in /requirements (#6650)

* chore(deps): bump pydantic from 2.6.0 to 2.6.1 in /requirements

Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](pydantic/pydantic@v2.6.0...v2.6.1)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update reproducibles: update-reproducible-linux-reqs

* Update reproducibles: update-reproducible-mac-reqs

* Update reproducibles: update-reproducible-win-reqs

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>

* chore(deps): bump the boto group in /requirements with 4 updates (#6676)

Bumps the boto group in /requirements with 4 updates: [boto3](https://github.com/boto/boto3), [boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]](https://github.com/youtype/mypy_boto3_builder), [botocore](https://github.com/boto/botocore) and [botocore-stubs](https://github.com/youtype/botocore-stubs).


Updates `boto3` from 1.34.32 to 1.34.39
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.34.32...1.34.39)

Updates `boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]` from 1.34.32 to 1.34.39
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

Updates `botocore` from 1.34.32 to 1.34.39
- [Changelog](https://github.com/boto/botocore/blob/develop/CHANGELOG.rst)
- [Commits](boto/botocore@1.34.32...1.34.39)

Updates `botocore-stubs` from 1.34.32 to 1.34.39
- [Release notes](https://github.com/youtype/botocore-stubs/releases)
- [Commits](https://github.com/youtype/botocore-stubs/commits)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: botocore
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: botocore-stubs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump tzdata from 2023.4 to 2024.1 in /requirements (#6675)

Bumps [tzdata](https://github.com/python/tzdata) from 2023.4 to 2024.1.
- [Release notes](https://github.com/python/tzdata/releases)
- [Changelog](https://github.com/python/tzdata/blob/master/NEWS.md)
- [Commits](python/tzdata@2023.4...2024.1)

---
updated-dependencies:
- dependency-name: tzdata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump cfn-lint from 0.85.0 to 0.85.1 in /requirements (#6669)

Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint) from 0.85.0 to 0.85.1.
- [Release notes](https://github.com/aws-cloudformation/cfn-python-lint/releases)
- [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md)
- [Commits](aws-cloudformation/cfn-lint@v0.85.0...v0.85.1)

---
updated-dependencies:
- dependency-name: cfn-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>

* chore(deps): bump markupsafe from 2.1.4 to 2.1.5 in /requirements (#6654)

Bumps [markupsafe](https://github.com/pallets/markupsafe) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/pallets/markupsafe/releases)
- [Changelog](https://github.com/pallets/markupsafe/blob/main/CHANGES.rst)
- [Commits](pallets/markupsafe@2.1.4...2.1.5)

---
updated-dependencies:
- dependency-name: markupsafe
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump ruff from 0.2.0 to 0.2.1 in /requirements (#6652)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.2.0...v0.2.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: updating app templates repo hash with (b2f83d35cfe79f4057149330ab73f7c1e929b2b1) (#6659)

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Haresh Nasit <84355507+hnnasit@users.noreply.github.com>

* chore(deps): bump ruamel-yaml from 0.18.5 to 0.18.6 in /requirements (#6661)

Bumps [ruamel-yaml]() from 0.18.5 to 0.18.6.

---
updated-dependencies:
- dependency-name: ruamel-yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump flask from 3.0.1 to 3.0.2 in /requirements (#6651)

Bumps [flask](https://github.com/pallets/flask) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](pallets/flask@3.0.1...3.0.2)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump pyinstaller from 6.3.0 to 6.4.0 in /requirements (#6681)

Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](pyinstaller/pyinstaller@v6.3.0...v6.4.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump pytest-metadata in /requirements (#6682)

Bumps [pytest-metadata](https://github.com/pytest-dev/pytest-metadata) from 3.1.0 to 3.1.1.
- [Changelog](https://github.com/pytest-dev/pytest-metadata/blob/master/CHANGES.rst)
- [Commits](pytest-dev/pytest-metadata@3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: pytest-metadata
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump python-slugify from 8.0.3 to 8.0.4 in /requirements (#6683)

Bumps [python-slugify](https://github.com/un33k/python-slugify) from 8.0.3 to 8.0.4.
- [Changelog](https://github.com/un33k/python-slugify/blob/master/CHANGELOG.md)
- [Commits](un33k/python-slugify@v8.0.3...v8.0.4)

---
updated-dependencies:
- dependency-name: python-slugify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump the boto group in /requirements with 4 updates (#6693)

Bumps the boto group in /requirements with 4 updates: [boto3](https://github.com/boto/boto3), [boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]](https://github.com/youtype/mypy_boto3_builder), [botocore](https://github.com/boto/botocore) and [botocore-stubs](https://github.com/youtype/botocore-stubs).


Updates `boto3` from 1.34.39 to 1.34.41
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.34.39...1.34.41)

Updates `boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]` from 1.34.39 to 1.34.41
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

Updates `botocore` from 1.34.39 to 1.34.41
- [Changelog](https://github.com/boto/botocore/blob/develop/CHANGELOG.rst)
- [Commits](boto/botocore@1.34.39...1.34.41)

Updates `botocore-stubs` from 1.34.39 to 1.34.41
- [Release notes](https://github.com/youtype/botocore-stubs/releases)
- [Commits](https://github.com/youtype/botocore-stubs/commits)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: botocore
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
- dependency-name: botocore-stubs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: boto
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump rpds-py from 0.17.1 to 0.18.0 in /requirements (#6692)

Bumps [rpds-py](https://github.com/crate-py/rpds) from 0.17.1 to 0.18.0.
- [Release notes](https://github.com/crate-py/rpds/releases)
- [Commits](crate-py/rpds@v0.17.1...v0.18.0)

---
updated-dependencies:
- dependency-name: rpds-py
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump black from 24.1.1 to 24.2.0 in /requirements (#6685)

Bumps [black](https://github.com/psf/black) from 24.1.1 to 24.2.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@24.1.1...24.2.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump setuptools from 69.0.3 to 69.1.0 in /requirements (#6684)

Bumps [setuptools](https://github.com/pypa/setuptools) from 69.0.3 to 69.1.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](pypa/setuptools@v69.0.3...v69.1.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* use python3.12 due to windows limitations

* skip py3.12 tests on windows

* use py3.11

* use common method for checking runtime

* use generic skip message

* fix runtime check

* fix local manifest json

* update deprecated runtimes

* fix init unit test

* update config json schema

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Lucas <12496191+lucashuy@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Mil <84205762+mildaniel@users.noreply.github.com>
Co-authored-by: Haresh Nasit <84355507+hnnasit@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
8 people authored Feb 21, 2024
1 parent 42ca587 commit 8228acd
Show file tree
Hide file tree
Showing 121 changed files with 286 additions and 303 deletions.
2 changes: 1 addition & 1 deletion samcli/commands/build/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
\b
Supported Runtimes
------------------
1. Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 using PIP\n
1. Python 3.8, 3.9, 3.10, 3.11, 3.12 using PIP\n
2. Nodejs 20.x, 18.x, 16.x, 14.x, 12.x using NPM\n
3. Ruby 3.2 using Bundler\n
4. Java 8, Java 11, Java 17, Java 21 using Gradle and Maven\n
Expand Down
3 changes: 3 additions & 0 deletions samcli/lib/build/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
"nodejs6.10",
"nodejs8.10",
"nodejs10.x",
"nodejs12.x",
"nodejs14.x",
"dotnetcore2.0",
"dotnetcore2.1",
"dotnetcore3.1",
"python2.7",
"python3.6",
"python3.7",
"ruby2.5",
"ruby2.7",
}
Expand Down
2 changes: 0 additions & 2 deletions samcli/lib/build/workflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def get_selector(

def get_layer_subfolder(build_workflow: str) -> str:
subfolders_by_runtime = {
"python3.7": "python",
"python3.8": "python",
"python3.9": "python",
"python3.10": "python",
Expand Down Expand Up @@ -152,7 +151,6 @@ def get_workflow_config(
}

selectors_by_runtime = {
"python3.7": BasicWorkflowSelector(PYTHON_PIP_CONFIG),
"python3.8": BasicWorkflowSelector(PYTHON_PIP_CONFIG),
"python3.9": BasicWorkflowSelector(PYTHON_PIP_CONFIG),
"python3.10": BasicWorkflowSelector(PYTHON_PIP_CONFIG),
Expand Down
10 changes: 0 additions & 10 deletions samcli/lib/init/local_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,5 @@
"packageType": "Zip",
"useCaseName": "Hello World Example"
}
],
"python3.7": [
{
"directory": "template/cookiecutter-aws-sam-hello-python",
"displayName": "Hello World Example",
"dependencyManager": "pip",
"appTemplate": "hello-world",
"packageType": "Zip",
"useCaseName": "Hello World Example"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ A cookiecutter template to create a Python Hello world boilerplate using [Server

Generate a boilerplate template in your current project directory using the following syntax:

* **Python 3.7**: `sam init --runtime python3.7`
* **Python 3.8**: `sam init --runtime python3.8`
* **Python 3.9**: `sam init --runtime python3.9`

Expand Down
4 changes: 2 additions & 2 deletions samcli/lib/providers/sam_stack_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ def normalize_resource_path(stack_file_path: str, path: str) -> str:
* symlinks on Windows might not work properly.
https://stackoverflow.com/questions/43333640/python-os-path-realpath-for-symlink-in-windows
For example, using Python 3.7, realpath() is a no-op (same as abspath):
For example, using Python 3.8, realpath() is a no-op (same as abspath):
```
Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32
Python 3.8.8 (tags/v3.8.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.symlink('some\\path', 'link1')
Expand Down
1 change: 0 additions & 1 deletion samcli/lib/utils/architecture.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"nodejs16.x": [ARM64, X86_64],
"nodejs18.x": [ARM64, X86_64],
"nodejs20.x": [ARM64, X86_64],
"python3.7": [X86_64],
"python3.8": [ARM64, X86_64],
"python3.9": [ARM64, X86_64],
"python3.10": [ARM64, X86_64],
Expand Down
5 changes: 1 addition & 4 deletions samcli/local/common/runtime_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
RUNTIME_DEP_TEMPLATE_MAPPING = {
"python": [
{
"runtimes": ["python3.12", "python3.11", "python3.10", "python3.9", "python3.8", "python3.7"],
"runtimes": ["python3.12", "python3.11", "python3.10", "python3.9", "python3.8"],
"dependency_manager": "pip",
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-python"),
"build": True,
Expand Down Expand Up @@ -121,7 +121,6 @@ def get_local_lambda_images_location(mapping, runtime):
"python3.10",
"python3.9",
"python3.8",
"python3.7",
# ruby runtimes in descending order
"ruby3.2",
]
Expand All @@ -145,7 +144,6 @@ def get_local_lambda_images_location(mapping, runtime):
"python3.10": "amazon/python3.10-base",
"python3.9": "amazon/python3.9-base",
"python3.8": "amazon/python3.8-base",
"python3.7": "amazon/python3.7-base",
"ruby3.2": "amazon/ruby3.2-base",
}

Expand All @@ -160,7 +158,6 @@ def get_local_lambda_images_location(mapping, runtime):
"java11": "Java8",
"java17": "Java8",
"java21": "Java8",
"python3.7": "Python36",
"python3.8": "Python36",
"python3.9": "Python36",
"python3.10": "Python36",
Expand Down
4 changes: 0 additions & 4 deletions samcli/local/docker/lambda_debug_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,6 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime
**_container_env_vars,
},
),
Runtime.python37.value: lambda: DebugSettings(
entry + ["/var/lang/bin/python3.7"] + debug_args_list + ["/var/runtime/bootstrap"],
container_env_vars=_container_env_vars,
),
Runtime.python38.value: lambda: DebugSettings(
entry + ["/var/lang/bin/python3.8"] + debug_args_list + ["/var/runtime/bootstrap.py"],
container_env_vars=_container_env_vars,
Expand Down
7 changes: 3 additions & 4 deletions samcli/local/docker/lambda_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class Runtime(Enum):
nodejs16x = "nodejs16.x"
nodejs18x = "nodejs18.x"
nodejs20x = "nodejs20.x"
python37 = "python3.7"
python38 = "python3.8"
python39 = "python3.9"
python310 = "python3.10"
Expand Down Expand Up @@ -79,7 +78,7 @@ def get_image_name_tag(cls, runtime: str, architecture: str) -> str:
Returns
-------
str
Image name and tag for the runtime's base image, like `python:3.7` or `provided:al2`
Image name and tag for the runtime's base image, like `python:3.12` or `provided:al2`
"""
runtime_image_tag = ""
if runtime == cls.provided.value:
Expand Down Expand Up @@ -166,7 +165,7 @@ def build(self, runtime, packagetype, image, layers, architecture, stream=None,
if self.invoke_images:
base_image = self.invoke_images.get(function_name, self.invoke_images.get(None))
if not base_image:
# Gets the ECR image format like `python:3.7` or `nodejs:16-x86_64`
# Gets the ECR image format like `python:3.12` or `nodejs:16-x86_64`
runtime_only_number = re.split("[:-]", runtime_image_tag)[1]
tag_prefix = f"{runtime_only_number}-"
base_image = f"{self._INVOKE_REPO_PREFIX}/{runtime_image_tag}"
Expand Down Expand Up @@ -262,7 +261,7 @@ def _generate_docker_image_version(layers, runtime_image_tag):
List of the layers
runtime_image_tag str
Runtime version format to generate image name and tag (including architecture, e.g. "python:3.7-x86_64")
Runtime version format to generate image name and tag (including architecture, e.g. "python:3.12-x86_64")
Returns
-------
Expand Down
8 changes: 3 additions & 5 deletions schema/samcli.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"properties": {
"parameters": {
"title": "Parameters for the init command",
"description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.7, python3.12, python3.11, python3.10, ruby3.2\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.7-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.",
"description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.12, python3.11, python3.10, ruby3.2\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.",
"type": "object",
"properties": {
"no_interactive": {
Expand All @@ -48,7 +48,7 @@
"runtime": {
"title": "runtime",
"type": "string",
"description": "Lambda runtime for application.\n\nRuntimes: dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.7, python3.12, python3.11, python3.10, ruby3.2",
"description": "Lambda runtime for application.\n\nRuntimes: dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.12, python3.11, python3.10, ruby3.2",
"enum": [
"dotnet6",
"go1.x",
Expand All @@ -66,7 +66,6 @@
"python3.10",
"python3.11",
"python3.12",
"python3.7",
"python3.8",
"python3.9",
"ruby3.2"
Expand All @@ -84,7 +83,7 @@
"base_image": {
"title": "base_image",
"type": "string",
"description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.7-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base",
"description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base",
"enum": [
"amazon/dotnet6-base",
"amazon/go-provided.al2-base",
Expand All @@ -101,7 +100,6 @@
"amazon/python3.10-base",
"amazon/python3.11-base",
"amazon/python3.12-base",
"amazon/python3.7-base",
"amazon/python3.8-base",
"amazon/python3.9-base",
"amazon/ruby3.2-base"
Expand Down
6 changes: 3 additions & 3 deletions tests/end_to_end/test_runtimes_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def validate(self, command_result: CommandResult):
("runtime", "dependency_manager"),
[
("go1.x", "mod"),
("python3.7", "pip"),
("python3.11", "pip"),
],
)
class TestHelloWorldDefaultEndToEnd(EndToEndBase):
Expand Down Expand Up @@ -104,7 +104,7 @@ def test_hello_world_default_workflow(self):
("runtime", "dependency_manager"),
[
("go1.x", "mod"),
("python3.7", "pip"),
("python3.11", "pip"),
],
)
class TestHelloWorldZipPackagePermissionsEndToEnd(EndToEndBase):
Expand Down Expand Up @@ -142,7 +142,7 @@ def test_hello_world_workflow(self):
("runtime", "dependency_manager"),
[
("go1.x", "mod"),
("python3.7", "pip"),
("python3.11", "pip"),
],
)
class TestHelloWorldDefaultSyncEndToEnd(EndToEndBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.restapi
Runtime: python3.7
Runtime: python3.11
Events:
SimpleCase:
Type: HttpApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Resources:
Method: get
RestApiId:
Ref: ApiGatewayApi
Runtime: python3.7
Runtime: python3.11
Handler: index.handler
InlineCode: |-
def handler(event, context):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Resources:
Method: get
RestApiId:
Ref: ApiGatewayApi
Runtime: python3.7
Runtime: python3.11
Handler: index.handler
InlineCode: |-
def handler(event, context):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Resources:
Method: get
RestApiId:
Ref: ApiGatewayApi
Runtime: python3.7
Runtime: python3.11
Handler: index.handler
InlineCode: |
def handler(event, context):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.restapi
Runtime: python3.7
Runtime: python3.11
Events:
SimpleCase:
Type: HttpApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.restapi
Runtime: python3.7
Runtime: python3.11
Events:
HttpApiANYdefault:
Type: HttpApi
Expand All @@ -18,7 +18,7 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.restapi
Runtime: python3.7
Runtime: python3.11
Events:
HttpApiANYhello:
Type: HttpApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Resources:
Properties:
Handler: index.handler
CodeUri: s3://bucket/key
Runtime: python3.7
Runtime: python3.11
Events:
Api:
Type: HttpApi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.restapi
Runtime: python3.7
Runtime: python3.11
Events:
SimpleCase:
Type: HttpApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/hello.zip
Handler: hello.handler
Runtime: python3.7
Runtime: python3.11
MemorySize: '700'
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Resources:
Handler: lambda.lambda_handler
Role:
Fn::Sub: arn:${AWS::Partition}:iam::${AWS::AccountId}:role/lambda-role
Runtime: python3.7
Runtime: python3.11
CodeUri: s3://bucket/key
AutoPublishAlias: live
DeploymentPreference:
Expand All @@ -34,7 +34,7 @@ Resources:
Handler: hook.lambda_handler
Role:
Fn::Sub: arn:${AWS::Partition}:iam::${AWS::AccountId}:role/lambda-role
Runtime: python3.7
Runtime: python3.11
CodeUri: s3://bucket/key
FunctionName: CodeDeployHook_preTrafficHook
AutoPublishAlias: live
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/hello.zip
Handler: hello.world
Runtime: python3.7
Runtime: python3.11
RolePath: /foo/bar
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.restapi
Runtime: python3.7
Runtime: python3.11
Events:
HelloAWSIAMAuth:
Type: HttpApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Resources:
Function:
Type: AWS::Serverless::Function
Properties:
Runtime: python3.7
Runtime: python3.11
Handler: index.handler
CodeUri: s3://bucket/key
Events:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Resources:
Function:
Type: AWS::Serverless::Function
Properties:
Runtime: python3.7
Runtime: python3.11
Handler: index.handler
CodeUri: s3://bucket/key
Events:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.restapi
Runtime: python3.7
Runtime: python3.11
Events:
Basic: # integration exists
Type: HttpApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Resources:
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.restapi
Runtime: python3.7
Runtime: python3.11
Events:
# The following events use the implicit AWS::Serverless::HttpApi called "ServerlessHttpApi".
# The Iam Authorizer of the implicit AWS::Serverless::HttpApi is enabled using the global above.
Expand Down
Loading

0 comments on commit 8228acd

Please sign in to comment.