I have inherited a piece of lambda in my organization which is not working with the following error, it is being run as a python Lambda code as is being triggered as a cron job every day:
aws lambda invoke --function-name es-cleanup-lambda outfile --payload '{"es_endpoint":"search-t-1.es.amazonaws.com"}'
{"errorMessage": "'AWSPreparedRequest' object has no attribute 'hooks'", "errorType": "AttributeError", "stackTrace": [["/var/task/es-cleanup.py", 169, "lambda_handler", "for index in es.get_indices():"], ["/var/task/es-cleanup.py", 154, "get_indices", "return self.send_to_es(\"/_cat/indices\")"], ["/var/task/es-cleanup.py", 125, "send_to_es", "res = session.send(preq)"], ["/var/runtime/botocore/vendored/requests/sessions.py", 634, "send", "hooks = request.hooks"]]
No clue on why the AWSprepared method invocation is missing the hooks, Do we reckon I would need to update the boto Lib somehow Clueless at the moment.