How can I call a Lambda function directly from a React app on Amplify without using Congito as Auth?

0

I have an publicly accessible app that should get some data from a Lambda function. I've provided the Amplify app with a service role (IAM) that grants access to the Lambda. However, when I call the InvokeFunction method of the AWS SDK 3.0, the error "Missing credentials" are thrown. As I haven't provided any, it makes somewhat sense..

Is it at all possible to use the service role to get access to the Lambda, or do I need to either create a function URL for the Lambda function or wrap an API Gateway API in front of it?

What I want is to have an Amplify app without authentication calling a Lambda function that only the app has access to.

perage
asked 19 days ago160 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions