Authenticate app to AWS API Gateway with Cognito
Following is my use case -
I am developing an android app. I am trying to use aws api gateway and a lambda function at back of it. but even before i login i want to secure the HTTP calls and authenticate my application. For that i am planning to use cognito with the API Gateway. so first my call will go to cognito which will authenticate the application(not user) and then my call will go to any Lamda function. I want to include all of this in the SDK of api gateway.
Ques 1 - Is it even possible to do this way ( please refer me to some documentation or code)
Ques 2 - Is it recommended. or is there a better way to do it ?