amazon-web-servicespostmanaws-api-gatewayamazon-cognitoamazon-cognito-facebook

How setup header in Postman for Api Gateway authenticated with Cognito?


I use AWS Identity Pool with Facebook provider to authenticate client. I need to invoke AWS Lambda using Api Gateway. From Cognito, using Facebook token, i received credentials: AccessKeyId, SecretKey and SessionToken.

Using this credentials, how should I setup header request to invoke my Lambda?

Api Gateway setup (test calls my lambda)

enter image description here

I try to call my api, it returns "The security token included in the request is invalid."

enter image description here

Thank you!


Solution

  • You have to manually set 'x-amz-security-token' in Postman and pass the token in that header.