服务 · 安全性、身份与合规性
Amazon Cognito
Adds sign-up, sign-in and access control to your own web and mobile apps, and scales to millions of users.
本课尚未翻译,暂以英文显示。
- 1A user signs up or signs in through Cognito, directly or with an existing social account.
- 2Cognito sends the app tokens that prove who the user is.
- 3If the app needs AWS resources, an identity pool swaps the tokens for temporary AWS credentials, for example to save the user’s photo in Amazon S3.
分步说明
- 1A user signs up or signs in through Cognito, directly or with an existing social account.
- 2Cognito sends the app tokens that prove who the user is.
- 3If the app needs AWS resources, an identity pool swaps the tokens for temporary AWS credentials, for example to save the user’s photo in Amazon S3.
Cognito between your app’s users and AWS.
Answers
- User pool
- Who is this user?
- Identity pool
- Which AWS resources may this user use?
Gives the app
- User pool
- Tokens after sign-up or sign-in
- Identity pool
- Temporary AWS credentials
示例
- User pool
- Sign in with email, or with Google or Apple
- Identity pool
- A signed-in user uploads a photo to Amazon S3
| 比较项 | User pool | Identity pool |
|---|---|---|
| Answers | Who is this user? | Which AWS resources may this user use? |
| Gives the app | Tokens after sign-up or sign-in | Temporary AWS credentials |
| 示例 | Sign in with email, or with Google or Apple | A signed-in user uploads a photo to Amazon S3 |
是什么
Amazon Cognito handles identity for the customers of your applications, not for your employees. It gives your app a user directory, ready-made sign-up and sign-in, and security features such as MFA, so you do not have to build them.
A Cognito user pool is the user directory. It signs users in and gives your app tokens that prove who they are. Users can sign in with an email address and password, without a password by using a passkey or a one-time code, or with an account they already have at Google, Apple, Facebook or Amazon. Company SAML and OIDC providers work too.
是什么
A Cognito identity pool gives users temporary AWS credentials, so your app can use services such as Amazon S3 or Amazon DynamoDB on the user’s behalf. It can also give limited access to guests who have not signed in.
要记住
- Cognito = customer identity for web and mobile apps.
- User pool: who is this user? (authentication)
- Identity pool: which AWS resources may this user use? (authorization)
- Social sign-in with Google, Apple, Facebook or Amazon.
- Scales to millions of users.
考试中
- “Add user sign-up and sign-in to a mobile app” or “let customers log in with their social media accounts” points to Amazon Cognito.
- Employee access to AWS accounts is IAM Identity Center, not Cognito.
别和这些弄混
AWS IAM Identity CenterOne place to manage your workforce’s sign-in to all your AWS accounts and business applications.
AWS Identity and Access Management (IAM)Controls who can sign in to your AWS account and what each person or application is allowed to do.
- Identity federationSign in to AWS with an identity you already have, instead of creating new users in AWS.