簡體   English   中英

是否可以從Python Boto同步調用AWS Lambda函數?

[英]Is it possible to synchronously invoke an AWS Lambda function from Python Boto?

此頁面僅顯示異步調用的方法。 我想象會有一個同步調用選項。

http://boto.readthedocs.org/en/latest/ref/awslamba.html?highlight=invoke

顯然有可能使用.NET:

如何從EC2實例調用AWS Lambda函數?

文檔說明將InvocationType指定為RequestResponse以進行同步調用

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM