We have written Lambda functions AWS. Such as, pass a Contact Id and return a list of phone numbers of the contact (in json).
We are building an Amplify-React App. We want to call the existing Lambda functions. The Amplify React App and the Lambda functions are in the same AWS account and same region.
- Can we call the Lambda function directly in the Amplify-React App? Or, we must expose the Lambda functions in API gateway first?
- If we can call the Lambda function directly in Amplify-React, can you share the sample javascript to do so?
- Is there a best practice how to call an existing Lambda function in an Amplify-React App?