If you do this, the response will be returned immediately and the subsequent processing can be performed with the second call, so it will be difficult for a timeout to occur. Although the number of calls is doubled.
def lambda_handler(event, context):
if "hoge" not in event:
event["hoge"] = "fuga"
boto3.client("lambda").invoke(
FunctionName=context.function_name,
InvocationType="Event",
Payload=json.dumps(event),
)
return {}
#What you really want to do below
I searched for Python but couldn't find it, so I'll write it down.
Access authority to call Lambda from Lambda needs to be set separately
Recommended Posts