question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(aws_lambda_python): PythonFunction runtime is not respected

See original GitHub issue

When trying to change from deploying an aws_lambda.Function to an aws_lambda_python.PythonFunction, even though I’ve set runtime=aws_lambda.Runtime.PYTHON_3_8 the Docker builds are performed with ARG IMAGE=amazon/aws-sam-cli-build-image-python3.7

Reproduction Steps

  1. Instantiate a PythonFunction with runtime=aws_lambda.Runtime.PYTHON_3_8.
  2. cdk synth

What did you expect to happen?

CDK should use the Python 3.8 image to build.

What actually happened?

CDK used the default Python 3.7 image to build.

Environment

  • CDK CLI Version : 1.98.0 (build 79f4512)
  • Framework Version: aws-cli/1.19.52 Python/3.8.6 Linux/5.11.13-arch1-1 botocore/1.20.52
  • Node.js Version: v14.15.1
  • OS : Arch Linux
  • Language (Version): Python (3.8.6)

Other


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
eladbcommented, Jul 4, 2021

I am closing this for now. @l0b0 let us know if this is still relevant.

1reaction
eladbcommented, Jun 30, 2021

@peterwoodworth can you try to reproduce this? Code seems to suggest that the runtime version is respected. Reassign to me when ready.

Read more comments on GitHub >

github_iconTop Results From Across the Web

(lambda-python): arm64 architecture is not respected #18696
Obviously later on my lambda functions are configured as follow: PythonFunction(..., runtime=Runtime.PYTHON_3_9, architecture=Architecture.
Read more >
Troubleshoot Python (Boto 3) Lambda function runtime errors
My Python (Boto 3) AWS Lambda function returns "unknown service", "parameter validation failed", or "object has no attribute" errors.
Read more >
AWS error from Python: No module named lambda_function
Go to Lambda functions, then select Layers, then scroll to Runtime settings and click Edit.
Read more >
Intro to AWS Lambda with Python - YouTube
Join us in this video tutorial we walk through step-by-step how to write AWS Lambda functions in Python to interact with S3 and...
Read more >
terraform-aws-modules/lambda/aws
Requires Python 3.6 or newer. Create, store, and use deployment packages - read more. Create, update, and publish AWS Lambda Function and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found