Skip to content

Getting back empty string for "invokedFunctionArn" #2458

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

Closed
amirrezaJC opened this issue Feb 25, 2021 · 2 comments
Closed

Getting back empty string for "invokedFunctionArn" #2458

amirrezaJC opened this issue Feb 25, 2021 · 2 comments
Labels
guidance General information and guidance, answers to FAQs, or recommended best practices/resources.

Comments

@amirrezaJC
Copy link

Your Environment

  • OS: MacOS Big Sur 11.1
  • JetBrains product: Intellij Idea
  • JetBrains product version: Intellij IDEA 2020.3.2 (community Edition) Build #IC-203.7148.57
  • AWS Toolkit version: 1.24-203
  • SAM CLI version: SAM CLI, version 1.18.1
  • JVM/Python version: openjdk 11.0.7 2020-04-14

Question
I have created a lambda and tried to run it locally with the help of Intellij and AWS toolkit but I always get back empty invokedFunctionArn, I want to be able to read the value of invokedFunctionArn and parse it but can not do it locally.

This is what I get back when I print context as JSON

{
  "memoryLimit": 128,
  "awsRequestId": "9260a74a-6193-40a3-9a7b-be76fca0c695",
  "logGroupName": "aws/lambda/Function",
  "logStreamName": "$LATEST",
  "functionName": "Function",
  "functionVersion": "$LATEST",
  "invokedFunctionArn": "",
  "deadlineTimeInMs": 3228543030283,
  "logger": {}
}

I have tried to set

AWS_LAMBDA_INVOKED_FUNCTION_ARN=arn:aws:lambda:us-east-1:111111111:function:myfunction:plt-stg

but it didn't work id I do the same thing with AWS_LAMBDA_FUNCTION_NAME it changes the functionName in the context but I can not set invokedFunctionArn

@amirrezaJC amirrezaJC added the guidance General information and guidance, answers to FAQs, or recommended best practices/resources. label Feb 25, 2021
@hunterwerlla
Copy link
Contributor

This issue seems similar to what you are encountering: aws/aws-lambda-runtime-interface-emulator#11, it might have been a regression in sam cli 1.13.0 and there is an open PR to hopefully fix it aws/aws-lambda-runtime-interface-emulator#23 . You can also file this issue in the AWS SAM cli repo: https://github.com/aws/aws-sam-cli/issues

@hunterwerlla hunterwerlla reopened this Feb 25, 2021
@rli rli changed the title etting back empty string for "invokedFunctionArn" Getting back empty string for "invokedFunctionArn" Feb 25, 2021
@rli
Copy link
Contributor

rli commented Aug 17, 2022

Closing as this appears to be resolved

@rli rli closed this as completed Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance General information and guidance, answers to FAQs, or recommended best practices/resources.
Projects
None yet
Development

No branches or pull requests

3 participants