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
852 stars 366 forks source link

while build i get No module named 'lib.cw_metrics_util' #243

Closed jegjeyam closed 1 year ago

jegjeyam commented 1 year ago

____ ERROR collecting test/test_access_handler.py _____ ImportError while importing test module '/private/tmp/aws-waf-security-automations/source/access_handler/test/test_access_handler.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) test/test_access_handler.py:16: in from access_handler.access_handler import * access_handler.py:21: in from lib.cw_metrics_util import WAFCloudWatchMetrics E ModuleNotFoundError: No module named 'lib.cw_metrics_util'

naruhide commented 1 year ago

Version: v4.0.0

As far as the code of deployment/build-s3-dist.sh is concerned, the following modules are not found either.

source/lib/cw_metrics_util.py
source/lib/logging_util.py
source/lib/s3_util.py
source/lib/cfn_response.py
jegjeyam commented 1 year ago

where can i find those modules? or how to build it properly?

source/lib/cw_metrics_util.py source/lib/logging_util.py source/lib/s3_util.py source/lib/cfn_response.py

naruhide commented 1 year ago

Those modules don't seem to exist in v4.0.0. So it won't work properly. Is v4.0.0 under development?.....

knihit commented 1 year ago

Release v4.0.1 fixes the issue.