- [Speaker] Now lets talk about Amazon Cognito.
Now with Amazon Cognito we have two really useful features.
We have Amazon Cognito Identity and Amazon Cognito Sync.
Now with Amazon Cognito Identity this is
this part of the service can integrate with OpenID providers
to allow our end users, perhaps they are,
you know, users of our applications, they can log in
with any OpenID provider, such as login with twitter,
login with Facebook or login with Google
or again, any OpenID provider.
And from there we can create user identity pools.
Users will authenticate against that OpenID provider
and then Cognito Identity
can help us manage those identities
across different platforms and different devices.
So if they've logged in with Facebook
on their mobile device and then they go home
and log in on their desktop
we can help manage that same user identity.
Cognito can also help us to leverage temporary keys,
which is considered a security best practice.
If you remember back during earlier lesson
when we talked about role based authentication.
And so here are the ideas that with temporary keys
by using temporary keys, we can avoid
the need to embed long-term keys
within the application.
And so, here, okay, a user, again, they might
log in with one of these OpenID providers
and by doing that they either
create a new user identity within the user pool,
or refresh an existing one.
And then whether they log in from a mobile device
or they log in with, from a desktop,
doesn't really matter.
Either way we can leverage Cognito
to deliver temporary keys to either the mobile application
or the web application, and then
wherever that application is running
it can then use those temporary keys
to communicate with Amazon services directly.
It can communicate, for example
to S3 directly, or to DynamoDB, or Lambda,
or API Gateway directly without necessarily
having to pass through our own back end API's.
And so that provides a very powerful pattern
for allowing us to create, you know,
event driven and asynchronous types of applications.
Now another thing that Amazon Cognito can do
is with Amazon Cognito Sync we can use that
to store App data, State and Preferences
and all kinds of other things on particular devices.
And then as a user goes from one device
to another device, we can have Cognito Sync
automatically sync that data between
those different devices.
And of course, not only can we sync across different devices
but also across operating systems and platforms.
We can also leverage Amazon Cognito Sync
to work offline.
If we are creating some type of
document processing system and application,
then we could allow our users to work offline.
And this is especially useful
in a mobile environment
where perhaps they are on some type
of an unreliable network connection
where they, perhaps they don't have access
to wifi and their cell reception is maybe in and out,
and so perhaps they can continue working,
and then once they are back in good signal
or once they are back to wifi
then sync can continue.
And so with work offline it does store the data
in a local SeQuaLite database.
And then of course it works seamlessly.
Right, so again, if as internet connections come and go,
when its intermittent or even totally absent,
Cognito Sync can allow us to work offline
and then re-sync again without the user
ever really even knowing.
Right, so keep, keep Amazon Cognito in mind,
if you want to leverage, especially for mobile applications
or applications that are, that have both mobile clients
and desktop clients, and you want to allow your users
to authenticate against an OpenID provider
like Twitter or Facebook
and/or you want to enable your users to sync data
between different devices and different platforms.