How to call one lambda function using another

+2 votes
I have two lambda function, one creates records and other creates ticket for that record. I tried almost everything but could not find how to call one function from another can anyone help me with this?
Mar 26, 2019 in AWS by tyler
4,838 views

1 answer to this question.

+1 vote

Here is how I did it using python boto3.

from boto3 import client as boto3_client
from datetime import datetime
import json
lambda_client = boto3_client('lambda')
def lambda_handler(event, context):
    msg = {"key":"new_invocation", "at": datetime.now()}
    invoke_response = lambda_client.invoke(FunctionName="another_lambda_",
                                           InvocationType='Event',
                                           Payload=json.dumps(msg))
    print(invoke_response)
answered Mar 26, 2019 by Esha

Related Questions In AWS

+1 vote
1 answer
0 votes
1 answer

How to update aws lambda function using aws cli?

Hi@akhtar, You can update your Lambda function in ...READ MORE

answered Sep 23, 2020 in AWS by MD
• 95,460 points
3,044 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

How to kill a lambda function in AWS?

$ aws lambda put-function-concurrency --function-name my-function --reserved-concurrent-executions ...READ MORE

answered Mar 28, 2019 in AWS by Shashank
• 1,370 points
23,444 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP