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개 답변
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
답변함 7달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인