-
Notifications
You must be signed in to change notification settings - Fork 219
Description
We're running a lambda via CloudFormation that is using this sdk
requirements.txt
requests
boxsdk[jwt]
boxsdk
Everything runs fine when we use a lambda runtime of 3.6. The only problem with this is that AWS is deprecating 3.6 this summer. I would still like to be able to update the lambda if I need to later (it will still run on a deprecated version--it just won't allow me to update anything). I would like it to be on python3.9 at least.
The build process is fine. But when I try to run the lambda (with version >3.6), I get this error message:
{ "errorMessage": "Unable to import module 'lambda_function': No module named '_cffi_backend'", "errorType": "Runtime.ImportModuleError", "requestId": "<request-id>", "stackTrace": [] }
I've been working with our internal cloud team and they've had me try a few different things like adding cffi directly to the requirements file and also trying cffi==1.15.0 etc. Those solutions unfortunately did not work. Doing something like this didn't make sense to my use case because it is a cloudformation and I don't see how I would be adding layers to a lambda cf (other than doing something with requirements.txt) unless I'm just not familiar with doing that?
We reached out to our Box contacts and they recommended opening an issue directly with you. We think it might have something to do with boxsdk[jwt] but we're honestly not sure how to proceed at this point.