import boto3
def lambda_handler(event, context):
clientLambda = boto3.client("lambda")
clientLambda.invoke(
FunctionName="recieveMail",
InvocationType="Event",
Payload=json.dumps(event)
)
I call it from boto3's lambda client with the ʻinvoke () method. I was addicted to using ʻInvocation Type
because I didn't understand it well.
This guy receives either ʻEvent | RequestResponse, ʻEvent
is asynchronous,
RequestResponse
is synchronous
Each works.
I was thinking of processing a large amount of mail at the SES Event, and when I ran into a problem that I couldn't handle at all by selecting RequestResponse
appropriately, there was an explanation at the (?) Mark.
It was me that was bad. That's the story.
Recommended Posts