Sentry Lambda Error

0

I was using sentry AWS Lambda, Now I uninstalled that integration from Sentry. Now I am getting the error response "/opt/extensions/sentry-lambda-extension: line 3: SENTRY_DSN: unbound variable".

  • Can you share some more information on your setup? and Lambda Code used? environment variable and libraries. From what I can see you didn't properly uninstall the Sentry integration, that is way is still looking for the variable SENTRY_DNS

  • Hello there,

    Depending on how you have packaged your Lambda function and have provided the Sentry SDK library dependencies in your Lambda function, you may find that you will not only have to remove the sentry layer from your function or remove the Sentry SDK library dependencies from your's function .zip deployment package but you will also have to remove the Sentry SDK and it's methods from your function code. You may also have defined environment variables for sentry in your function, these will also have to be removed.

asked a year ago345 views
1 Answer
0

Hi,

Thanks for reaching out. As already mentioned by Simone Tallevi and Mpumelelo_Z, it would seem that the uninstallation of Sentry from your Lambda function is incomplete.

The error here implies that there's an issue with the Lambda code and there are dependencies to Sentry which have not been removed. Please review how you added this integration to the Lambda function so that you know what to remove from your Lambda function.

Please note that Sentry is a 3rd party application and I am not an export on it. That said, I've checked the documentation and it's possible that you just need to ensure that the Sentry layer is removed -> https://docs.sentry.io/product/integrations/cloud-monitoring/aws-lambda/how-it-works/?original_referrer=https%3A%2F%2Fwww.google.com%2F. It looks like this layer tries to connect to your SENTRY_DSN which is an environment variable. If this environment variable has been deleted but the layer still exists, then it's possible that it leads to the error that you are seeing.

AWS
SUPPORT ENGINEER
Ryan_A
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions