Passer au contenu

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.

demandé il y a 2 ans506 vues
1 réponse
0

Wrapping API Gateway would give the feature benefits of using API Gateway. Recommend using API Gateway.

AWS
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.