0
votes

I'm new to lambda, I tried invoking a lambda function with another lambda using the following script

import boto3 region = 'ca-central-1'

def lambda_handler(event,context): client.boto3('lambda' , region_name='region') response = client.invoke(FunctionName='xyz',LogType='None') print(response)

but im getting "EndpointConnectionError : unable to connect to endpoint https://lambda-xyz/wehwk.com

I also tagged lambda full access policy to this lambda function.

Am I missing something ? Thanks in advance

1

1 Answers

1
votes

Instead of client.boto3('lambda' , region_name='region') you should use:

client = boto3.client('lambda')

Observe that you have client and boto3 inverted. Then you can use the client:

response = client.invoke(FunctionName='xyz',LogType='None')
print(response)