ladderlore
လမ်းညွှန် တောင်းဆိုရန်
  • S3 သို့မဟုတ် IAM လို service အမည်ကို ရိုက်ထည့်ပါ။

Service · Security, Identity, and Compliance · CLF-C02 အပေါ် ဆက်လေ့လာရန်

Amazon Cognito

User pool for sign-in and tokens, identity pool for AWS credentials, and the integrations that use them.

ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။

Cloud Practitioner မှ သင်သိပြီးသားများ

  • Cognito is identity for the customers of your web and mobile apps.
  • A user pool signs users in. An identity pool gives temporary AWS credentials.
  • It supports social sign-in and scales to millions of users.
Cloud Practitioner သင်ခန်းစာကို ဖတ်ရန်
  • Sign-up, sign-in, tokens for an API

    User pool
  • App uploads straight to S3

    Identity pool, after sign-in
  • Limited access for guests

    Identity pool, unauthenticated role
  • Protect an API Gateway API

    User pool authorizer
  • Require sign-in at an ALB

    ALB authenticate action with a user pool
Which Cognito feature for which need.
App user
User pool
Identity pool
S3
  1. 1The user signs in to the user pool and receives tokens.
  2. 2The app gives the token to the identity pool.
  3. 3The identity pool returns temporary AWS credentials, and the app calls S3.
From sign-in to AWS credentials.

အဆင့်ဆင့်

  1. 1The user signs in to the user pool and receives tokens.
  2. 2The app gives the token to the identity pool.
  3. 3The identity pool returns temporary AWS credentials, and the app calls S3.

From sign-in to AWS credentials.

ဘာလဲ

A user pool is a directory. It handles sign-up, sign-in, MFA and password recovery. It can also take sign-ins from Google, Apple, Facebook, SAML and OIDC providers. After sign-in it returns JSON Web Tokens (JWTs): an ID token, an access token and a refresh token. A hosted sign-in page, called managed login, saves you from building screens.

An identity pool exchanges a token from a user pool, a social provider or another provider for temporary AWS credentials. It gives different IAM roles to signed-in users and to guests. This lets a mobile app upload to Amazon S3 directly.

ဘာလဲ

Integrations: an Amazon API Gateway Cognito authorizer checks a user pool token before your API runs. An Application Load Balancer listener rule can authenticate users with a user pool before forwarding the request.

မှတ်ထားရန်

  • User pool: who the user is. It returns JWTs.
  • Identity pool: what the user may do in AWS. It returns temporary credentials.
  • A user pool can federate Google, Apple, Facebook, SAML and OIDC.
  • API Gateway authorizer and ALB authenticate action both use user pools.
  • Guests get an unauthenticated role through the identity pool.

မှတ်ထားရန်

  • Staff sign-in is IAM Identity Center, not Cognito.

စာမေးပွဲမှာ

  • “Add sign-up and sign-in to a mobile app with social providers” points to a Cognito user pool.
  • “Mobile app users upload photos straight to S3” points to a Cognito identity pool, after user pool sign-in.
  • “Only signed-in users may call an API Gateway API” points to a Cognito user pool authorizer.