‫Okay, so we are in Cognito User Pools,
‫and to quickly switch to Cognito Identity Pools,
‫we click on Federated Identities right here,
‫and this should take us to a new UI.
‫Okay, so we need to create a new identity pool,
‫so we'll call it MyDemoIdentityPool,
‫and then we have the option to allow for guest users,
‫so with unauthenticated identities,
‫so we allow users without a credentials
‫to even access our resources, so we can click this
‫and this is enabled, and this is very strong distinction
‫of identity pools and user pools,
‫so this allows for guest users to just use our application.
‫Then we have the authentication flow settings
‫and we have two, we have enhance process,
‫or a three-step classic flow,
‫so I'll just leave it unchecked,
‫and this is the enhance process,
‫and then finally, the authentication providers that we want.
‫So it supports all of these right here,
‫so Amazon, Apple, Facebook, Google+,
‫Twitters, OpenID, SAML, or even a custom,
‫or they has direct integration with Cognito identity pool,
‫so we just need to provide the pool ID
‫and the app client ID for it to work,
‫so this is something that we have already created,
‫so let me go back into Cognito to find out these values.
‫So back into Cognito, I'm going to Manage User Pools,
‫I have my DemoPool right here,
‫and then I'm going to go into my pool ID
‫which is right here, so I'll copy this and paste it here,
‫and the app client ID, so I go to app clients
‫and take this app client's ID and paste it here.
‫So this is how we integrate an identity provider
‫with Cognito identity pool.
‫So we're good to go, we'll create this pool,
‫and we are done.
‫Next we need to identify the IAM roles to use
‫with your new identity pool, so we can look at the detail,
‫and this will create roles for me,
‫so there is a role for my normal users,
‫so this is the role that will be created for me
‫which is a basic role, and then there will be
‫a second role created for me which is the IAM role,
‫and this is for my unauthenticated identity,
‫so two IAM roles were created for this purpose.
‫We'll click on Allow, and these two roles
‫will be created for me,
‫and then to get started with identity pools,
‫we need to download the right SDK,
‫so we have options of Android, iOS, JavaScript, and so on,
‫and then you download the SDK and you can get started.
‫So this is just code based
‫so we don't have to worry about it too much,
‫but so if I go to the Dashboard to see things,
‫I can see the number of people
‫who are unauthenticated and authenticated,
‫the number of identities, as well as some graphs,
‫the rest is just code based, and then finally,
‫we have an identity browser,
‫so we can search by identity ID after the users log in.
‫So it's a very simple thing, Federated Identities,
‫this is all now code based so I won't go any further,
‫but the one thing you have to remember in here is that,
‫now we have two roles that have been created,
‫so for my identity pools,
‫so this Cognito_MyDemoIdentyPoolAuth_Role and Unauth_Roles,
‫and this is what we would need to customize to decide
‫what our authenticated users have access to in AWS.
‫So right now they are authenticated,
‫they can access mobileanalytics, cognito-sync,
‫and cognito-identity, but I could edit and attach policy,
‫for example S3ReadOnlyAccess, and customize this
‫to make sure that only the user has access
‫to read what they can read in the first place.
‫So back in my identity pool,
‫there's more options that are hidden,
‫so if you go to the top right
‫and click on edit identity pool,
‫we can see all the options
‫that get offered to us for Cognito identity pools,
‫so we can see the pool name, the pool ID,
‫and the list of roles for unauthenticated users
‫and authenticated users, then we can look at
‫the identities settings for guest users,
‫the flow settings we had from before,
‫the identity providers that we had configured,
‫so we configured from Cognito user pools
‫but we can configure some more as well,
‫and then we have three other options,
‫so push synchronization which is that
‫if somehow the user settings are changed on one device,
‫they can be pushed silently to all the other devices,
‫and so we can configure it,
‫we have Cognito Streams which allows us
‫to push every dataset change into Cognito
‫into a Kinesis stream in real time,
‫and so from this Kinesis stream then we can enable
‫some real time processing of these events,
‫and then finally, Cognito Events
‫to allow to run Lambda functions
‫in response to important events in Cognito,
‫and then you will need to define a Lambda function as well,
‫and the last option is to delete the identity pool.
‫So that's it for Cognito identity pools,
‫I cannot show you anything further
‫because we need to deal with some code
‫and actually this is pretty involved,
‫but hopefully you understand that now,
‫thanks to Federative Identity or identity pools,
‫we allow our users to exchange their credentials
‫for AWS credentials that are going to be temporarily
‫and respect the IAM roles and policies
‫coming from the roles that you have defined here.
‫So that's it for this lecture, I hope you liked it,
‫and I will see you in the next lecture.