AWS Lambda with Python 3.12 not supported
How do you use Sentry?
Sentry Saas (sentry.io)
Version
AWS Lambda Version 101
Steps to Reproduce
The latest Sentry AWS Lambda layer (101) does not support Python 3.12 which was released Dec 2023.
While viewing a lambda function in the AWS Console
- Select the "Code" tab
- View the "Layers" section at the bottom
- Verify that the "SentryPythonServerlessSDK" layer is at version 101 which is the latest version at time of writing.
- Note that the layer compatible runtime does not list python 3.12
Expected Result
The documentation and the layer's compatible runtimes should list python 3.12 as a supported version.
Actual Result
The latest version of python supported is 3.11
AWS Console
Doc
Thanks @tinycogio. We don't have a timeline for this yet -- we'll keep this issue open to track progress on this.
Has there been any progress on this issue? We recently set up this integration and one of the key workloads that we want to monitor is on Python 3.12, but we didn't realise that this version was unsupported until after setting things up.
@amrishparmar No progress yet – we are busy with other projects at the moment. We are happy to accept and review community PRs if anyone would like to contribute.
It looks like support for 3.12 and 3.13 are now available, but the docs still only mention up to 3.11
I can't tell what the current latest version is (permissions for listing versions of that layer are misisng), but from poking around with this:
aws lambda get-layer-version \
--layer-name arn:aws:lambda:ca-central-1:943013980633:layer:SentryPythonServerlessSDK \
--region ca-central-1 \
--version-number 150
I could tell that there are versions that support 3.13 --- but I still don't know what the latest version is, unless I try incrementing all the numbers until I find the point where it fails (It currently is at 153)
References:
https://docs.sentry.io/organization/integrations/cloud-monitoring/aws-lambda/#:~:text=Currently%2C%20there%27s%20no%20way%20of%20using%20the%20latest%20layer%20plugin%20since%20the%20lambda%3AListLayerVersions%20on%20resource%3A%20arn%3Aaws%3Alambda%3Aeu%2Dwest%2D1%3A943013980633%3Alayer%3ASentryNodeServerlessSDK%20hasn%27t%20been%20given%20the%20necessary%20permissions.
https://docs.sentry.io/platforms/python/integrations/aws-lambda/manual-layer/#:~:text=Lambda%20Layer%20Version%2077%2B%3A%20Python%203.7%2C%203.8%2C%203.9%2C%203.10%2C%203.11
Hey @tinycogio and @ert485 !
Thanks for reporting this and sorry for the confusion. The newer version of the Sentry Lambda Layer support everything until Python 3.13.
Yes, we need to update the documentation.
One way to find the newest layer ARN is if you go to this docs page: https://docs.sentry.io/platforms/python/integrations/aws-lambda/manual-layer/
In the "Install the Layer" section there is a drop down where you can select your AWS Region and will get the latest Layer for that region. (the drop down font color is also something we need to fix.)