Skip to content

Conversation

akats7
Copy link

@akats7 akats7 commented Sep 8, 2025

Description

The AWS Lambda instrumentation module is not compatible with slash based handlers, the instrumentation relies on import_lib without sanitizing the handler path which could include slashes. This causes the lambda to fail.

Fixes # (issue)

#3733

Type of change

Please delete options that are not relevant.

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added test_handler_slash_notation in test_aws_lambda_instrumentation_manual.py that checks thats slash based handlers do not cause AwsLambdaInstrumentor to error.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • [X ] No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Copy link

linux-foundation-easycla bot commented Sep 8, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: akats7 / name: Alex Kats (2083676)

@akats7 akats7 changed the title slash based handler fix AWS Lambda Instrumentation slash based handler fix Sep 8, 2025
@akats7 akats7 force-pushed the aws-lambda-slash-handler branch from 70bf32b to 2083676 Compare September 8, 2025 03:10
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.

1 participant