sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

AWS Lambda with Python 3.9 not supported

Open antonpirker opened this issue 2 years ago • 1 comments

How do you use Sentry?

Sentry Saas (sentry.io)

Version

AWS Lambda

Steps to Reproduce

  1. I create a AWS Lambda function based on Python 3.9 in the AWS Console.
  2. I create a new project in sentry.io and in the Serverless tab I select AWS LAMBDA (PYTHON).
  3. I add the Sentry Cloudformation Stack to my AWS account
  4. I get the screen "We found 3 functions with Node or Python runtimes".
  5. In the list of the Lambda functions my function based on Python 3.8 is visible, but my function based on Python 3.9 is missing.

Expected Result

Being able to select my Python 3.9 Lambda function to add the Sentry integration.

Actual Result

The Python 3.9 function is not in the list of AWS Lambda functions I can enable Sentry for.

antonpirker avatar Apr 25 '22 08:04 antonpirker

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Jun 16 '22 00:06 github-actions[bot]

Same for me, AWS Lambda with Python3.9 not working but other functions with Python3.8 working fine

chapayevdauren avatar Jan 03 '23 13:01 chapayevdauren

Same for me, AWS Lambda, Python3.9, layer arn:aws:lambda:us-east-1:943013980633:layer:SentryPythonServerlessSDK:6

ragelo avatar Feb 02 '23 22:02 ragelo

UP! installed without layer, just sentry_sdk.init. Not capturing exceptions!!

van4oza avatar Mar 02 '23 19:03 van4oza

I would love to have supportability for more than just 3.9 as Python is already on 3.11.4

Angelodaniel avatar Aug 22 '23 11:08 Angelodaniel

Yes, this is kind of embarrassing by now. I will try to make time for this.

antonpirker avatar Sep 11 '23 13:09 antonpirker

Hi, is there any update on this? Currently trying to use Sentry with python 3.10 on AWS Lambda and running into the same issue. Thank you

oakhan3 avatar Sep 18 '23 17:09 oakhan3

No update right now sorry. But I will bring this up in our internal daily today, so we can find time to make this happen.

antonpirker avatar Sep 26 '23 07:09 antonpirker

I can see in the logs that the integration gets disabled.

[sentry] WARNING: Not running in AWS Lambda environment, AwsLambdaIntegration disabled (could not find handle_event_request)

I tried using LoggingIntegration. Unfortunately, it doesn't work either. It appears the event is sent, but it does not show up in Sentry.


[sentry] DEBUG: Sending event, type:null level:error event_id:26ab7befaa66435aa37e915105250098 project:4505952607141888 host:o1168346.ingest.sentry.io

Any suggestion until this is implemented?

trovafer avatar Oct 17 '23 22:10 trovafer

Hey @trovafer ! Do you get the WARNING: Not running in AWS Lambda environment message when running an actual Lambda function in AWS? (what python runtime are you using?)

antonpirker avatar Oct 23 '23 10:10 antonpirker

@antonpirker I did. But I found out a typo in the package version in our requirements.txt. We were using version 1.3.1 rather than 1.31.0.

I updated to the latest version 1.32.0 and it appears to be working now.

I'm using python3.9

trovafer avatar Oct 24 '23 23:10 trovafer

Ok, thanks for letting us know.

antonpirker avatar Oct 31 '23 10:10 antonpirker

Closing, this was released with 1.33.0.

sentrivana avatar Nov 06 '23 13:11 sentrivana