Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3.7 runtime not supported in AWS Lambda while creating the function #189

Closed
prajinkhadka opened this issue Mar 16, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working next-release

Comments

@prajinkhadka
Copy link
Collaborator

prajinkhadka commented Mar 16, 2024

While running the benchmark 210.thumbnailer ( with default config i.e. config/example.json as in the repository ) the botocore throws the error that the runtime parameter of Python3.7 is not supported.

This is because AWS lambda has stopped the support for python3.7 and python3.7 is used as default in the example config as of now.

These are the runtimes aws lambda supports as of now.
https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

I suggest changing the version to Python 3.8 or greater on config/example.json.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository and go to the SeBS root directory.
  2. Run the command : ./sebs.py benchmark invoke 210.thumbnailer test --config config/example.json --deployment aws --verbose
  3. See the error

Expected behavior
I was expecting the system to run without changing any config once all the requirements setups are done.

Logs

[23:10:51.708596] SeBS-4424 Created experiment output at /Users/prajin/Downloads/sebs/serverless-benchmarks
[23:10:52.038950] AWS.Resources-cbb4 Using cached resources for AWS
[23:10:52.039610] AWS.Config-c456 Using cached config for AWS
the experiment config is <sebs.experiments.config.Config object at 0x13ff13800>
the config is {'experiments': {'deployment': 'openwhisk', 'update_code': False, 'update_storage': False, 'download_results': False, 'runtime': {'language': 'python', 'version': '3.7'}, 'type': 'invocation-overhead', 'perf-cost': {'benchmark': '110.dynamic-html', 'experiments': ['cold', 'warm', 'burst', 'sequential'], 'input-size': 'test', 'repetitions': 50, 'concurrent-invocations': 50, 'memory-sizes': [128, 256]}, 'network-ping-pong': {'invocations': 50, 'repetitions': 1000, 'threads': 1}, 'invocation-overhead': {'repetitions': 5, 'N': 20, 'type': 'payload', 'payload_begin': 1024, 'payload_end': 6251000, 'payload_points': 20, 'code_begin': 1048576, 'code_end': 261619712, 'code_points': 20}, 'eviction-model': {'invocations': 1, 'function_copy_idx': 0, 'repetitions': 5, 'sleep': 1}}, 'deployment': {'name': 'aws', 'aws': {'region': 'us-east-1', 'lambda-role': ''}, 'azure': {'region': 'westeurope'}, 'gcp': {'region': 'europe-west1', 'project_name': '', 'credentials': ''}, 'local': {'storage': {'address': '', 'mapped_port': -1, 'access_key': '', 'secret_key': '', 'instance_id': '', 'input_buckets': [], 'output_buckets': [], 'type': 'minio'}}, 'openwhisk': {'shutdownStorage': False, 'removeCluster': False, 'wskBypassSecurity': 'true', 'wskExec': 'wsk', 'experimentalManifest': False, 'docker_registry': {'registry': '', 'username': '', 'password': ''}, 'storage': {'address': '', 'mapped_port': -1, 'access_key': '', 'secret_key': '', 'instance_id': '', 'input_buckets': [], 'output_buckets': [], 'type': 'minio'}}}}
benchmark_obj <sebs.benchmark.Benchmark object at 0x13f5467e0>
the deployment_client is <sebs.aws.aws.AWS object at 0x12f87eae0>
[23:10:52.226311] Benchmark-6f92 Using cached benchmark 210.thumbnailer at /Users/prajin/Downloads/sebs/serverless-benchmarks/cache/210.thumbnailer/aws/python/3.7/210.thumbnailer.zip
---- The function is {}
[23:10:52.226476] AWS-d697 Creating new function! Reason: function 210_thumbnailer_python_3_7 not found in cache.
[23:10:52.429346] AWS-d697 Creating function 210_thumbnailer_python_3_7 from /Users/prajin/Downloads/sebs/serverless-benchmarks/cache/210.thumbnailer/aws/python/3.7/210.thumbnailer.zip
ERROR:root:An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: The runtime parameter of python3.7 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (python3.12) while creating or updating functions.
Traceback (most recent call last):
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/sebs/aws/aws.py", line 184, in create_function
    ret = self.client.get_function(FunctionName=func_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/botocore/client.py", line 553, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/botocore/client.py", line 1009, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the GetFunction operation: Function not found: arn:aws:lambda:us-east-1:377578419284:function:210_thumbnailer_python_3_7

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/./sebs.py", line 30, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/./sebs.py", line 72, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/./sebs.py", line 97, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/./sebs.py", line 237, in invoke
    func = deployment_client.get_function(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/sebs/faas/system.py", line 178, in get_function
    function = self.create_function(code_package, func_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/sebs/aws/aws.py", line 219, in create_function
    ret = self.client.create_function(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/botocore/client.py", line 553, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/prajin/Downloads/sebs/serverless-benchmarks/python-venv/lib/python3.12/site-packages/botocore/client.py", line 1009, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidParameterValueException: An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: The runtime parameter of python3.7 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (python3.12) while creating or updating functions.
[23:10:54.604804] Benchmark-e075 Update cached config /Users/prajin/Downloads/sebs/serverless-benchmarks/cache/aws.json

System

  • SeBS version (release, branch, git commit): branch -> Master
  • Python version : 3.12.2
  • OS: Mac M1 Air 2020 ( Mac OS Ventura )
@mcopik mcopik added bug Something isn't working next-release labels Mar 16, 2024
@mcopik
Copy link
Collaborator

mcopik commented Mar 19, 2024

@prajinkhadka Thank you for the report! We need to update the most recent Python runtimes for AWS, Azure, and GCP. I marked it as an issue for the next release v1.2.

@mcopik mcopik self-assigned this Mar 19, 2024
@mcopik
Copy link
Collaborator

mcopik commented Jul 10, 2024

Fixed with #198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next-release
Projects
Status: Done
Development

No branches or pull requests

2 participants