Description
Description:
I want a lambda to call itself. I am using an expression inside a python programme
FunctionName=context.function_name
yet, it returns ResourceNotFoundException error as there is no such a function, actually somehow (why?) named test..
with the arn (as example) arn:aws:lambda::eu-west-1:104260451092:function:test.
If I set an enviroment variable: AWS_LAMBDA_FUNCTION_NAME inside template, it will work "almost" ok, but it will call aws account lambda, not the local one which I test.
So how to reference (the function name) of the locally invoked lambda function, so it will call itself ?
I thought it will be a name such as a copy of a main handler file - in my case name (name.py)
but no, as again - An error occurred (ResourceNotFoundException) when calling the Invoke operation: Function not found: arn:aws:lambda:eu-west-1:104260451092:function:main
Output of sam --version
:
SAM CLI, version 0.6.0
Hope there is still a way to pass a function name to the local lambda, not to call the aws one, but to call itself.