cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding dropbox library to layer causes lambda timeout

Adding dropbox library to layer causes lambda timeout

pchois
New member | Level 2

Hello,

 

I'm having an issue adding dropbox to the Python layer I use in my lambda function. The code works fine locally but when I add the library to my layer the lambda just times out. Locally I use Windows 11 and Python 3.9, my lambda is set to use Python 3.9. As I have been troubleshooting, here are some details that might be useful:

 

Trying to run the lambda without updating the layer produces an error: "Unable to import module 'lambda_function': No module named 'dropbox'" -> this is expected as the layer doesn't include the library. 

 

Pip shows that dropbox requires requests, six, and stone. Looking at the install log, it also added ply. Requests is already in my layer so I only added the dropbox files. After that, the error thrown is "Unable to import module 'lambda_function': No module named 'stone'". Again, expected. Here is where the problem manifests itself: when I add the files for stone to the layer, the lambda times out. No errors, no details, just a timeout. 

 

dropbox version: 11.36.0

stone version: 3.3.1

requests version: 2.28.1

 

Any ideas are greatly appreciated.

2 Replies 2

Greg-DB
Dropbox Staff

I can't say off hand why that would be timing out, but given that it works locally it does seem like it is related to that lambda environment. I recommend referring to the support resources for the lambda environment to debug this, or to see if you can enable more verbose output at least. Unfortunately as that environment isn't made by Dropbox we can't offer specific technical support for it though. Apologies I can't be of more direct help. If you do find an issue in the Dropbox or Stone library itself of course please let me know and I will raise it with the team to see what we can do about it.

no110
New member | Level 2

try to increase lambdas MemorySize ... 512 works for me

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    no110 New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?