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.

python3.8 debugging broken due to AWS Lambda bootstrap changes

See original GitHub issue

Description

aws-sam-cli makes the assumption that /var/runtime/bootstrap on the python3.8 runtime is a python file:

https://github.com/awslabs/aws-sam-cli/blob/89c5ed09f4c791f8f863b1057d3973944b87d80f/samcli/local/docker/lambda_debug_settings.py#L205

Which was true until today – it seems the AWS Lambda runtime team has updated it to be a bash file.

So users currently trying to use aws-sam-cli for debugging the python3.8 runtime will see a syntax error.

/var/runtime/bootstrap.py can now be run as main, so the argument could just be updated to that, or aws-sam-cli could use the new AWS_LAMBDA_EXEC_WRAPPER env variable that’s been introduced on the Amazon Linux 2 runtimes.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mhartcommented, Oct 8, 2020

FWIW @styfle that env variable is finally documented in public 😉

https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper

1reaction
mhartcommented, Jul 22, 2020

It’s not. It’s new. And… that’s all I can say about that for now 😆

Read more comments on GitHub >

github_iconTop Results From Across the Web

python3.8 debugging broken due to AWS Lambda bootstrap ...
Reopening as Python 3.8 changes are being rolled out and this will be an issue again. TLDR; /var/runtime/bootstrap is no longer a Python...
Read more >
Resolve "Unable to import module" errors from Python ... - AWS
I receive an "Unable to import module" error when I try to run my AWS Lambda code in Python. How do I resolve...
Read more >
Troubleshoot deployment issues in Lambda
When you update your function, Lambda deploys the change by launching new instances of the function with the updated code or settings.
Read more >
Step-through debugging Lambda functions locally
For example, you can perform local step-through debugging of your Lambda functions by setting breakpoints, inspecting variables, and executing function code ...
Read more >
Error handling and automatic retries in AWS Lambda
When you invoke a function directly, you determine the strategy for handling errors. You can retry, send the event to a queue for...
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