Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS .NET Mock Lambda Test Tool should set AWS_LAMBDA_FUNCTION_VERSION environment variable #1593

Open
2 tasks
dtPaTh opened this issue Oct 12, 2023 · 2 comments
Labels
feature-request A feature should be added or improved. module/lambda-test-tool p2 This is a standard priority issue queued xs Effort estimation: tiny

Comments

@dtPaTh
Copy link

dtPaTh commented Oct 12, 2023

Describe the feature

AWS .NET Mock Lambda Test Tool should set AWS_LAMBDA_FUNCTION_VERSION environment variable

Use Case

When instrumenting AWS Lambda functions with OpenTelemetry, this environment variable is used by the provided OpenTelemetry resource detector for AWS Lambda. If not set, the resource-detector throws an exception when configuring the TracerProviderBuilder. One needs to workaround, setting the environment variable e.g. within the launch options for the test tool.

image

Proposed Solution

AWS Lambda Test Tool should set AWS_LAMBDA_FUNCTION_VERSION environment variable

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS .NET SDK and/or Package version used

Version shipped with AWS Toolkit for Visual Studio 2022 v 1.43.00

Targeted .NET Platform

.NET 6

Operating System and version

Windows 11

@dtPaTh dtPaTh added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 12, 2023
@ashishdhingra ashishdhingra added module/lambda-test-tool needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Oct 12, 2023
@ashishdhingra
Copy link
Contributor

More details on AWS_LAMBDA_FUNCTION_VERSION could be found at Using Lambda environment variables. May be lambda test tool should set it to a acceptable dummy value by default, which could be overridden by new command line parameter.

Needs review with the team.

@ashishdhingra ashishdhingra added xs Effort estimation: tiny p2 This is a standard priority issue queued and removed needs-review labels Oct 13, 2023
@dtPaTh
Copy link
Author

dtPaTh commented Nov 8, 2023

I just figured out, testing SNS triggers, the otel resource detector is missing the AWS_REGION env var.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/lambda-test-tool p2 This is a standard priority issue queued xs Effort estimation: tiny
Projects
None yet
Development

No branches or pull requests

2 participants