Unable to call AWS_IAM Authorized API Gateway method through React

0

I am not able to call AWS_IAM Authorized API Gateway method through React in my Amplify application. I have configured a new IAM user and attached "AmazonAPIGatewayInvokeFullAccess" policy to it. I was able to call the API Gateway method through Postman by configuring the authorization type to AWS Signature and adding the newly created IAM user's AccessKey & SecretKey.

I have tried various npm libraries like aws4, aws-sdk etc. but I couldn't do it.

There should be a way in amplify/ui-react library to invoke an AWS_IAM Authorized API Gateway method.

PS :- The API Gateway invokes a Lambda function

I also couldn't edit the API Gateway developed through Amplify CLI from AWS Management console, is this intentional?

1 Answer
0

You must reference the existing API Gateway in your Amplify: https://docs.amplify.aws/lib/restapi/getting-started/q/platform/js/#manual-setup-reference-existing-rest-api

Then you must generate your AWS Signature for your API request.

AWS
vtjean
answered 6 months ago

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