Skip to content

fix(aws-lambda): Change lambda function handler name to 'x.y'#1107

Merged
ahmedetefy merged 1 commit intomasterfrom
ahmed-fix-serverless-bug
May 6, 2021
Merged

fix(aws-lambda): Change lambda function handler name to 'x.y'#1107
ahmedetefy merged 1 commit intomasterfrom
ahmed-fix-serverless-bug

Conversation

@ahmedetefy
Copy link
Copy Markdown
Contributor

This PR provides :

  • Fix for AWS Function Handler name to be in the format of filename.function-name because
    passing paths (what we have now) as function name is giving us import errors from AWS Lambda
  • Added the initialisation script for AWS Lambda function handler name to path init_serverless_sdk.sentry_lambda_handler

Current Behavior:
Handler name: sentry_sdk.integrations.init_serverless_sdk.sentry_lambda_handler

Response from AWS

Response
{
  "errorMessage": "Unable to import module 'sentry_sdk.integrations.init_serverless_sdk': No module named 'init_serverless_sdk'",
  "errorType": "Runtime.ImportModuleError",
  "stackTrace": []
}

Note: Unable to replicate in backend tests that actually create real lambda functions and layers. Only able to replicate this behavior on the AWS Console

Fix for AWS Function Handler name to be in the format of filename.function-name because
passing paths as function names is giving us import errors from AWS Lambda
@ahmedetefy ahmedetefy requested a review from rhcarvalho May 6, 2021 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants