Cognito Flashcards

1
Q

Cognito is used when

A

we want to give our users an identity so they can interact with our servers and our application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Cognito is different products

A
  1. Cognito User Pools
  2. Cognito Identity Pools (Federated Identity)
  3. Cognito Sync
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Cognito User Pools

A
  • sign in functionality for app users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Cognito Identity Pools (Federated Identity Pools)

A
  • provide AWS credentials to users so they can access AWS resources directly
  • provide direct access to our AWS environment from the client side.
  • integrate with Cognito User Pools as an identity provider
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Cognito Sync

A

synchronize data from device to Cognito
probably deprecated and replaced by AppSync. But still on exam
AppSync is currently out of scope for the exam,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Cognito User Pools - what can you do

A
  • create a serverless database of users for your mobile apps.
  • simple login: username or email and pwd
  • possibility to verify emails, phone numbers and add MFA
  • can enable Federated Identiites (Facebook, Google, SAML)
  • sends back a JSON Web Token, can be used to verify
    the identity of someone. So can be integrated with API Gateway for authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Cognito User Pools -how

A
  1. We have our app and it wants to authenticate to CUP.
  2. It’s going to register our login using a password,
  3. CUP, after verifying the login, says, “Okay here is a JWT or JSON Web Token.”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cognito Identity Pools (Federated Identity Pools) how

A
  1. we log into a Federated Identity Provider, or we can choose to remain anonymous.
  2. And, from this we get temporary AWS credentials
    back from the Federated Identity Pool.
  3. And, then these credentials come with an IAM policy attached to it, and so we can do stuff based on this IAM policy.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Cognito Identity Pools (Federated Identity Pools) use case

A

we wanted to provide temporary access to write to an S3 bucket using a Facebook login.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Cognito Identity Pools (Federated Identity Pools) how internally

A
  1. our app is able to login to an identity provider. The identity provider can be whatever you want. It an be Google, Facebook, Twitter, SAML, OpenID. And, even the Cognito User Pools
  2. from there our app gets to login and gets a token.
  3. using this token, we are going to pass it on to our Federated Identity Pool.
  4. we authenticate using that token to our FIP, and it will verify the token with our identity provider just to make sure we are who we say we are.
  5. Once the token has been verified, the Federated Identity will talk to the STS service to get temporary credentials for AWS.
  6. Once it has that, it will pass on the temporary credentials back to our application, and now that our application has these temporary AWS credentials,
    it is, for example, able to interact directly with our S3 bucket. we have an IAM policy which allows us to do certain things and not do other things.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Cognito Sync lets you

A

store user preferences, configuration, and the state of our application, and it has a cross device synchronization capability.

Any platform, could be iOS, Android, etc. You can do offline stuff.

So, if you were to change your preferences offline and then you go back online, then they’re synchronized automatically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Cognito Sync - to have it working well,

A

you need to use Federate Identity Pools in Cognito not User Pools.

The data is stored in data sets, and each data set could be up to one megabyte, and we can have up to 20 data sets to synchronize.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SAM

A

Serverless Application Model

framework for developing and deploying serverless applications

is going to be done in YAML code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

through SAM you can configure

A

your Lambda functions, your DynamoDB tables, your API Gateway, your Cognito User Pools,
and SAM will help you deploy that automatically to the AWS Cloud

SAM allows you to quickly deploy your Lambda functions using the integration with Code Deploy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

SAM locally

A

SAM can help you run your Lambda functions, your API Gateway, and your DynamoDB tables locally on your computer so you can do some debugging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

You would like to provide a Facebook login before your users call your API hosted by API Gateway. You need seamlessly authentication integration, you will use

A

Cognito User Pools directly integration with Facebook Logins