Skip to content

'ILambdaContext.InvokedFunctionArn' always returning 'null' #802

@julealgon

Description

@julealgon

Description

I've created a new lambda function and I wanted to get the ARN for the function to pass along into my code for further processing. However, ILambdaContext.InvokedFunctionArn is always returning null, both when testing locally, as well as when calling the function in the real environment.

The documentation for the property does not state it can ever be null:

The ARN used to invoke this function. It can be function ARN or alias ARN. An
unqualified ARN executes the $LATEST version and aliases execute the function
version they are pointing to.

Reproduction Steps

  1. Create empty lambda
  2. Access the InvokedFunctionArn property in the ILambdaContext passed into the function
  3. Check that the value is always null

Environment

  • Package Version: Amazon.Lambda.Core v1.2.0
  • OS Info: Windows 10
  • Build Environment Visual Studio 2019
  • Targeted .NET Platform: NetCore 3.1

Resolution

  • 👋 I can/would-like-to implement a fix for this problem myself

This is a 🐛 bug-report

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions