Muhammad Hamid Raza
Muhammad Hamid Raza

Reputation: 205

How to invoke AWS lambda function using boto (2.49.0) library?

I want to invoke an AWS lambda function from my python application which is based on Google App Engine. First, I tried to use the latest AWS SDK for python i.e. boto3 but, it is not compatible with GAE. As described Here.

Now, I am trying to do so with the old SDK i.e. boto(v2.49.0), but in the docs, I could not find any function with the help of that I can invoke a lambda function. It does have invoke_async function but, I don't want to use it as my requirement is to call lambda function synchronously.

Is there any way I can call lambda function synchronously using boto(v2.49.0)? Or is there any REST API provided by AWS which can be used for this purpose?

Please note that the lambda function which I am trying to call is dependant on some of the attributes in the request so I need to pass these attributes while invoking the function!

Upvotes: 0

Views: 521

Answers (1)

If you cant use boto3 - but you can request a REST API synchronously tryout the AWS API Gateway - it is easy to set up a REST Endpoint calling a Lambda-Function. https://docs.aws.amazon.com/de_de/apigateway/latest/developerguide/getting-started-with-lambda-integration.html

Upvotes: 1

Related Questions