Lambdas Lambda.Client.invoke InvocationType = ApiGateway, Lambda. , , ApiGateway .
Lambda ApiGateway:
from __future__ import print_function
import boto3
import json
def lambda_handler(event, context):
response = client.invoke(
FunctionName='<your_long_task_running_function_executer>',
InvocationType='Event',
Payload=json.dumps(event)
)
return { "result": "OK" }
, , , .
p.s. , invoke_async
p.p.s. , , , : 0. , ; 1. api; 2. ( , ) InvocationType = 'Event' .