user3239711
user3239711

Reputation: 649

AWS Cognito and API Gateway for a RESTful API

I would like to build a RESTful API that will be used by a mobile app. We have decided to go for AWS.

I would like to implement a micro service for sign-in/sign-up using the API Gateway. Is their a way to use cognito behind the AWS Api Gateway ? I would like to create a lambda to sign-in users using Cognito. I want to do that to build a complete REST Api and by doing that avoid using any Cognito SDK.

Can you explain if it is possible and if so can someone show me how to proceed ?

Upvotes: 0

Views: 402

Answers (1)

Ashan
Ashan

Reputation: 19748

You should be able to write a Lambda function behind API Gateway endpoint, to receive cognito user credentials and authenticate using Cognito SDK. The response tokens from cognito authenticateUser methods needs to be sent back to your mobile client to invoke other API Gateway endpoints.

Upvotes: 0

Related Questions