Prisma cloud[ERROR] Runtime.ImportModuleError: Unable to import module 'twistlock': Failed to import module: lambda_function Traceback (most recent ca

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

Prisma cloud[ERROR] Runtime.ImportModuleError: Unable to import module 'twistlock': Failed to import module: lambda_function Traceback (most recent ca

L0 Member

We are getting the following error in our Lambdas, 

 

[ERROR] Runtime.ImportModuleError: Unable to import module 'twistlock': Failed to import module: lambda_function

Traceback (most recent call last):

 

After troubleshooting, our team identifies that is due Prisma Defender, apparently the lambda handler was changed to twistlock.handler.

10 REPLIES 10

L4 Transporter

Greetings SPerry5,

 

I hope that this note finds you well! I know that it has been a while since you had posted this question but I wanted to see if you still potentially needed any help. Thank you for your time and I hope that you have a good remainder of your day.

 

Kind Regards,

J. Avery King

J. Avery King | Prisma Cloud | Customer Success Engineer

L1 Bithead

We are also having the same issue,, Can we know the cause of this error message?

Hi Amy,

I have started to research this so I can try to assist.

Could you please answer the following?

 

1) Was the function working prior to adding the defender? We need to be certain that there are no issues here first.

2) How did you configure protection? (three options: auto-defend, manual embedding, adding a layer)

3) What programming/scripting language is the function?

4) Are you able to share the function with us for testing or some sanitized version without proprietary data / code, etc ?

 

Regards,

Brandon Goldstein, Customer Success Engineer, Prisma Cloud | PCCSE, GCP ACE

Here are some hints...

the language is python.

the lambda's entry point is a module named twistlock with a method named handler().

its likely that the lambda function's file should be named twistlock.py

Tommy Hunt AWS-CSA, Java-CEA, PMP, SAFe Program Consultant
thunt@citrusoft.org
https://www.citrusoft.org
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!