aws-api-gateway-cli-test | simple CLI to test API Gateway endpoints | REST library
kandi X-RAY | aws-api-gateway-cli-test Summary
kandi X-RAY | aws-api-gateway-cli-test Summary
A simple CLI to test API Gateway endpoints with IAM authorization
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aws-api-gateway-cli-test
aws-api-gateway-cli-test Key Features
aws-api-gateway-cli-test Examples and Code Snippets
Community Discussions
Trending Discussions on aws-api-gateway-cli-test
QUESTION
I have an AWS Cognito user pool/identity pool set up to authorize a Lambda function behind API-gateway. My lambda is using the AWS SDK for Node. The login process works fine. In my function, I have an CognitoIdentityServiceProvider
object that I'm using to call the getUser
function. The Access Key I'm giving the function is coming from the lambda variable event.requestContext.identity.accessKey
. However, the function call fails with the following error viewable through my Cloud Watch logs:
ANSWER
Answered 2019-Aug-03 at 23:29The accessKey
you are passing to the getUser API is not the accessToken
that it expects. event.requestContext.identity.accessKey
is the IAM user access key and not the accessToken
generated by AWS Cognito when user sign in. You will need to pass the JWT Access Token returned by Cognito initiateAuth API. Consider adding the access token in Authorization header when making the request.
QUESTION
I am using aws-api-gateway-cli-test to test API gateway. API is authenticated via cognito user pool, i am getting the error:
...ANSWER
Answered 2019-Apr-14 at 10:57QUESTION
I am following the https://serverless-stack.com/ tutorial which uses the Serverless framework to create an API that inserts objects into a DynamoDB table and associates them to the authenticated AWS Cognito user. I am attempting to convert the Node.js code to Java but I have hit a problem when getting the Cognito identity as shown on this page
...ANSWER
Answered 2018-Jul-20 at 11:01It turns out I hadn't translated the Node.js code correctly. To access the CognitoIdentityId
I had to get the requestContext
from the request
object, then get the identity
object, like so:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-api-gateway-cli-test
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page