[PYTHON] Launch Lambda on Boto3

import boto3

client = boto3.client('lambda')

#Value to put in Lambda's event variable
query = {
	"test1": "test",
	"test2": "test"
}

#Run Lambda
response = client.invoke(
	FunctionName='LAMBDA_FUNCTION_NAME',
	InvocationType='RequestResponse',
	LogType='Tail',
	Payload= query
)

#Read the response
res = response['Payload'].read()

Reference: http://boto3.readthedocs.io/en/latest/reference/services/lambda.html#Lambda.Client.invoke

Recommended Posts

Launch Lambda on Boto3
Launch code-server on alpine-linux
Launch local server on mac
Addictive points when downloading files using boto on AWS Lambda
lambda
Run Python on Schedule on AWS Lambda
code-server online environment (5) Launch code-server on Docker
Run PartiQL on Dynamodb via boto3
Install python library on Lambda using [/ tmp]
Install and launch k3s on Manjaro Linux
Try server-side encryption on S3 with boto3
[AWS] Link Lambda and S3 with boto3
[Python] Run Headless Chrome on AWS Lambda
Launch Flask application with Docker on Heroku