Directly invoke a named Lambda function with a payload. Returns the response.
(
self,
function_name,
payload,
invocation_type="Event",
log_type="Tail",
client_context=None,
qualifier=None,
)
| 1447 | return resource_arn |
| 1448 | |
| 1449 | def invoke_lambda_function( |
| 1450 | self, |
| 1451 | function_name, |
| 1452 | payload, |
| 1453 | invocation_type="Event", |
| 1454 | log_type="Tail", |
| 1455 | client_context=None, |
| 1456 | qualifier=None, |
| 1457 | ): |
| 1458 | """ |
| 1459 | Directly invoke a named Lambda function with a payload. |
| 1460 | Returns the response. |
| 1461 | """ |
| 1462 | invoke_kwargs = { |
| 1463 | "FunctionName": function_name, |
| 1464 | "InvocationType": invocation_type, |
| 1465 | "LogType": log_type, |
| 1466 | "Payload": payload, |
| 1467 | } |
| 1468 | if client_context: |
| 1469 | invoke_kwargs["ClientContext"] = client_context |
| 1470 | if qualifier: |
| 1471 | invoke_kwargs["Qualifier"] = qualifier |
| 1472 | |
| 1473 | return self.lambda_client.invoke(**invoke_kwargs) |
| 1474 | |
| 1475 | def rollback_lambda_function_version(self, function_name, versions_back=1, publish=True): |
| 1476 | """ |