aws-samples / aws-lambda-extensions

A collection of sample extensions to help you get started with AWS Lambda Extensions
MIT No Attribution
445 stars 146 forks source link

bash-example-wrapper: wrapper script works only if you choose Python 3.7 as runtime #71

Closed lucasantoiemma closed 2 years ago

lucasantoiemma commented 2 years ago

Good morning, I'm playing with the "bash-example-wrapper" example. In the README.md you suggest to use the "importtime" option that is supported by Python from the version 3.7. It may be useful to specify, in the same file, which runtime version to choose in order to not waste time looking for a non-existent error in the code. Thank you very much!

lucasantoiemma commented 2 years ago

PS: If I choose Python 3.7 it doesn't work; with 3.8 it runs as expected

julianwood commented 2 years ago

Thanks, yes this behaviour is expected. Although importtime is supported with Python 3.7. Wrapper scripts are supported with Python 3.8 and above. I'll update the example to specify. https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper