How to call one lambda function using another?

+1 vote
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 in AWS by tyler
23 views

1 answer to this question.

0 votes

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 by Esha

Related Questions In AWS

0 votes
1 answer

How do I invoke another lambda async and pass context to it?

I tried several times trying to pass ...READ MORE

answered Apr 27, 2018 in AWS by Cloud gunner
• 4,260 points
1,238 views
0 votes
1 answer

How to link AWS Lambda function to Amazon CloudWatch ?

In order to create Log Group and ...READ MORE

answered Jul 20, 2018 in AWS by datageek
• 2,440 points
114 views
+1 vote
1 answer

How to load CSV data to RDS Aurora table using lambda?

Launch an Amazon RDS MySQL database engine ...READ MORE

answered Jul 26, 2018 in AWS by Priyaj
• 56,160 points
918 views
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 in AWS by Shashank
• 1,350 points
226 views
0 votes
1 answer