Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Lambda deployment with function layer #59

Open
vladtamas opened this issue Jun 1, 2022 · 0 comments
Open

AWS Lambda deployment with function layer #59

vladtamas opened this issue Jun 1, 2022 · 0 comments

Comments

@vladtamas
Copy link

Hi,

I created a lambda python function with a lambda runtime environment set to python 3.6. I made a python 3.6 layer where I installed invokust and added it to the lambda function.

The code in my lambda function is:

import json
from invokust.aws_lambda import get_lambda_runtime_info

def lambda_handler(event, context):
# TODO implement
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}

When I execute it, I get the following error:

Response
{
"errorMessage": "module initialization error"
}

If I remove the invokust import, everything works fine. Does anybody have an idea how to fix this?

The command used to create the zip package for the lambda layer is: pip3 install --platform manylinux2014_x86_64 --target=python --implementation cp --python 3.6 --only-binary=:all: --upgrade invokust

After that, I zipped the python folder and uploaded it as a lambda layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant