Given a message, directly invoke the lamdba function for this task.
(self, message)
| 180 | return self |
| 181 | |
| 182 | def _send(self, message): |
| 183 | """ |
| 184 | Given a message, directly invoke the lamdba function for this task. |
| 185 | """ |
| 186 | message["command"] = "zappa.asynchronous.route_lambda_task" |
| 187 | payload = json.dumps(message) |
| 188 | if len(payload) > LAMBDA_ASYNC_PAYLOAD_LIMIT: # pragma: no cover |
| 189 | raise AsyncException("Payload too large for async Lambda call") |
| 190 | self.response = self.client.invoke( |
| 191 | FunctionName=self.lambda_function_name, |
| 192 | InvocationType="Event", # makes the call async |
| 193 | Payload=payload, |
| 194 | ) |
| 195 | self.sent = self.response.get("StatusCode", 0) == 202 |
| 196 | |
| 197 | |
| 198 | class SnsAsyncResponse(LambdaAsyncResponse): |
no test coverage detected