How to do it...

We will use CodePen to execute the JavaScript SDK code for Cognito operations, following these steps:

  1. Open CodePen and add locations to the required files.
  2. Go to https://codepen.io/.
  3. Click the Create tab and then select the Pen option.
  4. In the new window, click the Settings menu, select the Behaviour tab, and uncheck the Enabled option under Auto-Updating Preview.
  5. In the Settings menu, select the JavaScript tab and do the following:
    1. Search for aws sdk and select the appropriate SDK:

CodePen will populate the SDK URL (as we will see in the next screenshot).

  1. Add the URL of our amazon-cognito-identity.min.js file (for example, ...

Get Serverless Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.