newrelic / newrelic-lambda-layers

Source code and utilities to build and publish New Relic's public AWS Lambda layers.
https://newrelic.com/products/serverless-aws-lambda
Apache License 2.0
36 stars 43 forks source link

[ERROR] Distribution Not Found #114

Closed vinicius-roc closed 1 year ago

vinicius-roc commented 2 years ago

I deployed this week a new lambda with serverless-newrelic-lambda-layers plugin. When I run the Lambda i received the following error

...
 File "/opt/python/lib/python3.9/site-packages/newrelic/hooks/messagebroker_confluentkafka.py", line 60, in wrap_Producer_produce
    transaction.add_messagebroker_info("Confluent-Kafka", get_package_version("confluent-kafka"))
...

I already have a similar application and when I look for differences, the only one found was the newrelic lambda layer version.

On lambda that works the version was 30 and the lambda with erro, the version was 32. To solve I fixed the lambda arn to 30 and solve the problem.

newRelic:
  layerArn: arn:aws:lambda:us-east-1:451483290750:layer:NewRelicPython39:30

It works now, but the error on 32 remains.

I dont know if is related but we are using the serverless-python-requirements plugin with the following settings:

pythonRequirements:
  pythonBin: python3
  dockerizePip: non-linux
  zip: true
mrickard commented 2 years ago

Transferring this to the layers repo for Python team visibility, as this is tied to the Python layer versions. (@hmstepanek @umaannamalai)

hmstepanek commented 2 years ago

@gb-vinicius-cunha are you using confluent-kafka and if so what version?

vinicius-roc commented 1 year ago

Yes, I'm using confluent-kafka latest version 1.9.2

umaannamalai commented 1 year ago

Hi @gb-vinicius-cunha! We have a potential fix for this available in our latest Python lambda layer. Could you give that a try and let us know if the problem persists?

vinicius-roc commented 1 year ago

The fix worked! Thanks a lot!