What’s the difference between Amazon Cognito user pools and identity pools?

In the terminal (Ubuntu) after installing Amplify

amplify add auth
Using service: Cognito, provided by: awscloudformation
The current configured provider is Amazon Cognito. 
Do you want to use the default authentication and security configuration? Default configuration
Warning: you will not be able to edit these selections. 
How do you want users to be able to sign in? Email
Do you want to configure advanced settings? Yes, I want to make some additional changes.
Warning: you will not be able to edit these selections. 
What attributes are required for signing up? 
◯ Zone Info (This attribute is not supported by Facebook, Google, Login With Amazon.)
◯ Address (This attribute is not supported by Facebook, Google, Login With Amazon.)
Warning: you will not be able to edit these selections.     What attributes are required for signing up? Email
Do you want to enable any of the following capabilities? Em
ail Verification Link with Redirect                         ? Enter the URL that your users will be redirected to upon a
ccount confirmation: http://www.google.com                  ? Enter the subject for your custom account confirmation ema
il: Confirmation                                            ? Enter the body text for your custom account confirmation e
mail (this will appear before the link URL): Confirm...
Succesfully added the Lambda function locally
? Do you want to edit your verification-link function now? Y
es
Please edit the file in your editor: /home/ntala/Documents/reactaws/todo/amplify/backend/function/todob1d0e754CustomMessage/src/verification-link.js
? Press enter to continue 
Successfully added resource todob1d0e754 locally
Some next steps:
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud

NOTE: Careful with the “space” toggle selection

After that, the changes should be submited

$ amplify push

Adding the modules for authentication

sudo npm add aws-amplify aws-amplify-react
npm WARN eslint-config-react-app@5.2.0 requires a peer of eslint-plugin-flowtype@3.x but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN aws-amplify-react@3.1.5 requires a peer of @aws-amplify/ui@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @aws-amplify/api@2.1.5 requires a peer of @aws-amplify/pubsub@^1.2.4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ aws-amplify-react@3.1.5
+ aws-amplify@2.2.4
added 46 packages from 92 contributors and audited 918966 packages in 15.805s
45 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities

Again, paying attention to any warning messages.

Adding the authentication code

import React from 'react';
import logo from './logo.svg';
import './App.css';
import Auth from 'aws-amplify';      <----Add
import awsconfig from './aws-exports';      <----Add
import { withAuthenticator } from 'aws-amplify-react';      <----Add
Auth.configure(awsconfig);      <----Add
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}
export default withAuthenticator(App);      <----Add
//export default App;

Publish the new modifications using amplify

amplify publish

That will load the Login interface by default. A new account could be create there.

After adding some details an email would be send to the given email including the confirmation link. That link include the “verification code”, but if it is clicked there is no need for it.

Because there is the need of sign-in and sign-out, a component could be enabled to deal with this. Add the greeting component replacing the “export” section with the following code.

export default withAuthenticator(App,{includeGreetings: true});