This time I'm looking for passing parameters to lambda invoke using boto3.client instead of make a request to API gateway.
Assume I developed a lambda function that can be invoked through api get
. ie: https://linktolambda/<parameter>
and now I am trying to access same lambda function from another one using boto3 client.
I have read documentation from:
- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.invoke
- https://github.com/boto/boto3/issues/2225
- https://qxf2.com/blog/invoking-aws-lambda-functions-from-a-flask-app/
I have read stackoverflow questions, reddit questions, medium posts, etc. but I haven't found what I'm looking for.
Thanks in advance.
CodePudding user response:
Look at the Official AWS Code Example Github. For Python Code examples look here:
https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python
You can find how to invoke a Lambda function and pass parameters (exactly what you are looking for) in this code example:
Look at line 184.
CodePudding user response:
There is no boto3 api for that. You have to just make regular request to it like to any other website. For example, using requests library in python.