boto core error when running lambda function from AWS blog post

0

I'm following this blog post to help track information in AWS Quicksight: https://aws.amazon.com/blogs/big-data/centrally-tracking-dashboard-lineage-permissions-and-more-with-amazon-quicksight-administrative-dashboards/

I'm trying to run the lambda functions created by the cloud formation stack, and I'm running into these errors: "errorMessage": "No module named 'botocore.httpchecksum'" "errorMessage": "Unable to import module 'lambda_function': No module named 'botocore.httpchecksum'",

I can't figure out how to fix this, has anyone else run into this?

2 Answers
1

Hi,

Some folks have solved this issue by upgrading to a recent version of botocoe: see https://github.com/wazuh/wazuh-packages/issues/2668

Best,

Didier

profile pictureAWS
EXPERT
answered 2 months ago
0

It looks like this issue, and the advice is to reinstall boto3 & botocore which isn't much help for a Lambda function https://github.com/boto/boto3/issues/4083

If the CloudFormation stack trying to deploy both of the Lambda functions that are in the blog you link to? As there is no mention of botocore in either of them. If it's a different version of the function, or a new function entirely, check that import botocore is at the top of the code.

In the CloudWatch Logs log group for the Lambda is there any indication of whereabouts in the function (e.g. a line number) it's failing?

profile picture
EXPERT
Steve_M
answered 2 months ago
  • It has "import boto3" at the top of the code. Should I change it to import botocore?

    This is the error in cloudwatch: [ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'botocore.vendored.six.moves' Traceback (most recent call last):