Integrate microservice APIs with Lambda and Cognito

  1. In the AWS Management Console choose Services then search Lambda
  2. Under Functions, click on the Function name containing *Backend-*ApiLambda*
  3. On the Top Right corner, copy the ARN of the Lambda function
  4. Go back to the API in API Gateway and Click on GET method under /applications
    • Choose Integration Type as Lambda Function
    • Check the box – Use Lambda Proxy Integration
    • Paste the copied Lambda function ARN into the Lambda Function section
    • Click on Save
    • Click on Method Request
    • Change the value of Authorization to set to cognitoAuthorizer (if you don’t see the value, you might need to refresh the page by going back to main console of API and selecting the API again to come back to same section)
    • After choosing the value, click on check icon to save the selection
  5. Repeat the same steps for rest of the other methods under /applications and /{applicationId} resources