aws-solutions / aws-waf-security-automations

This solution automatically deploys a single web access control list (web ACL) with a set of AWS WAF rules designed to filter common web-based attacks.
https://aws.amazon.com/solutions/aws-waf-security-automations
Apache License 2.0
835 stars 358 forks source link

Runtime.ImportModuleError: Unable to import module 'helper': No module named 'lib.s3_util' #245

Closed patrickmagyarskaylink closed 1 year ago

patrickmagyarskaylink commented 1 year ago

Hello,

Describe the bug helper Lambda function log output: [ERROR] Runtime.ImportModuleError: Unable to import module 'helper': No module named 'lib.s3_util' Traceback (most recent call last):

In Line https://github.com/aws-solutions/aws-waf-security-automations/blob/main/deployment/build-s3-dist.sh#L148 the file s3_util.py should copied to the helper lib folder but the file is not in die source directory: https://github.com/aws-solutions/aws-waf-security-automations/tree/main/source/lib There are some other files too, which should be copied but not available in the directory. Please check them too.

stack_requirements.py want to use this lib: https://github.com/aws-solutions/aws-waf-security-automations/blob/main/source/helper/stack_requirements.py#L19

To Reproduce Error occurs during stack creation

Expected behavior

Please complete the following information about the solution:

Screenshots / Additional context /

patrickmagyarskaylink commented 1 year ago

related issue https://github.com/aws-solutions/aws-waf-security-automations/issues/243

knihit commented 1 year ago

Release v4.0.1 fixes the issue.