Hi,
I would like to invoke a lambda function from another lambda function. I am using the following code:
def list(event, context):
#function code
def dispatcher(event, context):
client = boto3.client('lambda')
response = client.invoke(
FunctionName='list'
)
return {
"response": response
}
But I am getting the following error:
An error occurred (ResourceNotFoundException) when calling the Invoke operation: Function not found: arn:aws:lambda:eu-west-1:xxxxxxxxx:function:list
I have checked and when I deploy the server, the arn for the function is
arn:aws:lambda:eu-west-1:0xxxxxxxxx:function:name-of-service-dev-list
Is there a way to get either the arn or the full name ([service_name]-[env]-[function_name]) from another function?
Thanks.