2

I am trying to create a lambda function that uses netCDF4. Unfortunately it seems netCDF4 is not supported in AWS. Is there a way to use netCDF4 in AWS?

Update: I created the zip file, however another module is missing (netCDF4._netCDF4) within the module I originally created the zip file for. Has anyone actually used specifically netCDF4 in a lambda function? Thanks in advance!

0

1 Answer 1

1

Is there a way to use netCDF4 in AWS?

Yes. There are three options for you:

Sign up to request clarification or add additional context in comments.

13 Comments

After creating the zip for netCDF4, another module appears to be missing. Here is the error: { "errorMessage": "Unable to import module 'lambda_function': No module named 'netCDF4._netCDF4'", "errorType": "Runtime.ImportModuleError", "stackTrace": [] }
@Arec Just create container lambda. This is the easiest way to handle lambda dependencies. Everything else is more complex to handle.
Honestly it seems more complex than the first option. I am still new to AWS, but I appreciate your help. I feel like I did everything correctly with the first option (which I just watched a YouTube video since I find it easier to follow along), but some how another module is missing.
@Arec Doesn't netCDF4 depend on C libraries as well? AWS lambda will not have them either.
When I pip install netCDF4, in the netCDF directory, _netCDF4.cp39-win_amd64.pyd is the only thing that is close to the _netCDF4 that is missing. Is this file related to the issue?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.