aws-solutions / content-analysis-on-aws

As of August 30, 2023, this AWS Solution is no longer available. Existing deployments will continue to run. The functionality provided by Content Analysis on AWS will be superseded with functionality in Media2Cloud on AWS and Content Localization on AWS. We encourage you to explore these solutions.
https://aws.amazon.com/solutions/implementations/aws-content-analysis/
Apache License 2.0
96 stars 47 forks source link

OpenSearch Consumer Lambda [ERROR] Runtime.ImportModuleError: cannot import name 'RequestsHttpConnection' from 'elasticsearch' #85

Closed rickosaws closed 1 year ago

rickosaws commented 1 year ago

Describe the bug The OpenSearch Consumer Lambda is throwing an Import Error when invoked when using elasticsearch==8.6.0 in requirements.txt

To Reproduce Have deployed from repo and rebuilt from source with the same result.

Expected behavior Consumer Lambda should execute successfully.

Please complete the following information about the solution:

[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_handler': cannot import name 'RequestsHttpConnection' from 'elasticsearch' (/var/task/elasticsearch/init.py) Traceback (most recent call last): Screenshots If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).

Additional context Add any other context about the problem here.

RequestsHttpConnection looks to be deprecated in Elasticsearch 8.0+ in favour of using RequestsHttpNode from elastic_transport.

raulmlamzn commented 1 year ago

Starting on August 30, 2023 Content Analysis on AWS will no longer be supported and the GitHub repository will be archived. Existing deployments will continue to run. If you have deployed Content Analysis on AWS via cloning GitHub open source code, you may continue to use the solution.

The functionality provided by Content Analysis on AWS will be superseded with functionality in Media2Cloud on AWS and Content Localization on AWS. We encourage you to explore these solutions.

https://github.com/aws-solutions/media2cloud-on-aws https://github.com/aws-solutions/content-localization-on-aws