您需要将payload参数设置为包含要传递的数据的映射.
let invocationRequest = AWSLambdaInvokerInvocationRequest() invocationRequest.functionName = "myFunction" invocationRequest.invocationType = AWSLambdaInvocationType.RequestResponse invocationRequest.payload = ["email" : "example@example.com", "name" : "example"] let lambdaInvoker = AWSLambdaInvoker.defaultLambdaInvoker() let task = lambdaInvoker.invoke(invocationRequest).continueWithSuccessBlock() { (task) -> AWSTask! in print("response: ", task.result) }