Let's say I have this usecase where the user is allowed to read from certain dynamodb table and getObject and putObject privileges in the S3.
Following items I have been able to establish-: 1. User is authenticated against cognito user pool 2. On successful auth, access token sent to API gateway 3. custom auth blueprint is used to validate and generate policy doc
Now what I am not able to understand is where and how do I mention the table/S3 permission specifics.
I went through the following documents/blogs
https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway/
http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html
However, I am still confused as to how and when will the policy document, created by the custom auth lambda, be used? and a clarification on the flow would be highly appreciated.