是否可以从Python Boto同步调用AWS Lambda函数?

2024-10-01 17:36:01 发布

您现在位置:Python中文网/ 问答频道 /正文

2条回答

documentation表示为同步调用指定InvocationType为{}

response = client.invoke(
    FunctionName='string',
    InvocationType= 'RequestResponse',
    LogType='None'|'Tail',
    ClientContext='string',
    Payload=b'bytes'|file,
    Qualifier='string'
)

你当然可以做到。在

response = client.invoke(
    FunctionName='string',
    InvocationType='Event'|'RequestResponse'|'DryRun',
    LogType='None'|'Tail',
    ClientContext='string',
    Payload=b'bytes',
    Qualifier='string'
)

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

相关问题 更多 >

    热门问题