I have an iOS Shopping App and want to call a lambda Function for logging. But i dont want to call the lambda function by an API Gateway to save costs. Is there a possibility to
You can do it in Swift using the AWSLambda Pod :
import AWSLambda
// ...
let request = AWSLambdaInvocationRequest()!
request.functionName = "name of your lambda"
request.invocationType = .requestResponse
let params: [String: Any] = [:]
request.payload = try! JSONSerialization.data(withJSONObject: params, options: [])
AWSLambda.default().invoke(request) { response, error in
if let error = error {
print(error)
} else {
print(response!.debugDescription)
}
}
Of course you'll need to setup correct permissions as described in the documentation AWS Lambda permissions