ExitAmazon Cognito vs AWS Identity and Access Management (IAM)1 / 9
Explanation

Separate application identity from AWS permissions

When application identity management belongs in Cognito and when AWS resource permissions belong in IAM. · associate

Amazon Cognito manages identities for web and mobile applications. Choose it when customers need to register, sign in, recover accounts, or sign in through an external identity provider. A Cognito user pool authenticates application users and issues tokens that an application or API can validate.

AWS Identity and Access Management (IAM) defines permissions for AWS resources. Choose IAM roles and policies when you need to specify which AWS actions a person or workload may perform on which resources. An application backend reading an S3 object needs AWS permissions even when its customer has already signed in through Cognito.

These services usually complement each other. Do not create an IAM user for each customer as a substitute for application registration, and do not treat successful Cognito sign-in as permission to use arbitrary AWS resources.

DecisionAmazon CognitoIAM
Primary concernApplication identitiesAWS resource permissions
Typical configurationUser pool and app clientRoles and policies
Example needCustomer sign-inBackend reads S3
Access boundaryApplication sessionAWS API actions

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.