Closed limanjun99 closed 1 year ago
Not entirely sure why we did not encounter this issue before. The fix for now is to ignore frames where the __name__
in frame globals is awslambdaric.bootstrap
, by passing it to the skip
parameter when initing a bdb instance. This fix should be sufficient if this is a one-time issue. If this occurs again with multiple other module names, it might be worth the effort to look into sandboxing/docker.
Another issue will be opened to look into adding integration tests in the future.
This issue was first discovered in this PR. The executor lambda was found to behave differently than in local testing, causing errors.
Consider the following testcase (which is already one of the unit tests):
It runs fine locally, but when deployed to AWS lambda and we manually run an invocation, we get this response instead:
Looking at the logs, we see that at some point in code execution, we enter a frame with the name
awslambdaric.bootstrap
, which highly suggests that Lambda is doing something that causes our code to error out.TODO