aws-samples / aws-samples/aws-security-hub-csv-manager

CsvExporter Lambda failing with "Unable to import module 'lambda_function': No module named 'csvObjects"

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
18
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Hi team

We are trying to test this solution

We have successfully deployed the CloudFormation stack in the ap-south-1 region. We are not trying to run a test as per "Step 2: Export Security Hub findings to a CSV file" of the [guide](https://aws.amazon.com/blogs/security/how-to-export-aws-security-hub-findings-to-csv-format/). However the test fails with the Lambda test returning the following:
````
{
"errorMessage": "Unable to import module 'lambda_function': No module named 'csvObjects'",
"errorType": "Runtime.ImportModuleError",
"requestId": "",
"stackTrace": []
}
````

The only deviation from the steps in the guide is that, in order to use the solution in the ap-south-1 region, we used our own S3 bucket to host the Lambda zip files for [csvExporter.zip](https://github.com/aws-samples/aws-security-hub-csv-manager/blob/main/csv_manager_sechub_cdk/lambdas/csvExporter.zip) and [csvUpdater.zip](https://github.com/aws-samples/aws-security-hub-csv-manager/blob/main/csv_manager_sechub_cdk/lambdas/csvUpdater.zip). The CFN stack deployment is otherwise successful

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.