In this chapter, you'll draw a clean line between Cognito user pools for sign-in and identity pools for AWS credentials, then verify a token's signature before you trust anything inside it. You'll then map where a permission really comes from among identity policies, resource policies, and the boundaries that cap them, and use that map to choose between IAM, Cognito, and Lambda authorizers for an API Gateway endpoint. Finally, you'll keep secrets out of code and logs, picking the store, the masking, and the rotation habits that survive an incident review.
Exercise 1: User pools, identity pools, and JWTsExercise 2: Verify a token before you trust itExercise 3: Decide access from the claimsExercise 4: Pick the right part of CognitoExercise 5: Identity, resource, and boundaryExercise 6: Choose the policy homeExercise 7: Name the layer that refusedExercise 8: Isolate one tenantExercise 9: Choosing an API Gateway authorizerExercise 10: Match the caller to the doorExercise 11: Close the stale windowExercise 12: Stop the confused deputyExercise 13: Keep secrets out of code and logsExercise 14: Where the value livesExercise 15: Sanitize without going blindExercise 16: Survive the rotation