pytogo / portforward

Kubernetes Port-Forward Go-Edition For Python

Home Page:https://portforward.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Lambda import error: /var/task/_portforward.abi3.so: invalid ELF header

wufengzlw opened this issue · comments

  • portforward version: 0.5.0
  • Python version: 3.8
  • Operating System: AWS Lambda function, x86_64

Description

I have a Lambda function with portforward module
Run time: Python 3.8
Arch: x86_64

the Lambda function crash with error

What I Did

import portforward

get this error:
Runtime.ImportModuleError: Unable to import module 'xxxxxxxxx': /var/task/_portforward.abi3.so: invalid ELF header

Hi @wufengzlw and thanks for the issue. Are there any steps to reproduce it (without Aws)?

Hi @corka149

I fixed it last night, I deploy Lambda function with Terraform and pip3 install the package locally (Mac M1)

so when I did the Terraform apply, the uploaded so file got error.

I fixed it with pip3 install package in the Ubuntu environment and replace the files.

Thanks for the reply!