Book Image

DynamoDB Cookbook

By : Tanmay Deshpande
Book Image

DynamoDB Cookbook

By: Tanmay Deshpande

Overview of this book

Table of Contents (18 chapters)
DynamoDB Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating an identity pool using AWS Cognito


In the previous recipe, we created DynamoDB tables based on the need. Now, it's time to think of securely accessing DynamoDB from the Android app. Unlike what we did for web apps, here we cannot distribute the AWS secret key and access key with each app, as we need to distribute the app to a number of users. If we embed the access and secret keys in the Android application package (APK), then it will make our AWS environment vulnerable.

So, in order to solve this problem, AWS has launched a service called AWS Cognito, which is a great tool to provide limited/required access to app users. In this recipe, we are going to see how to use Cognito to create an identity pool. You can read about AWS Cognito at https://aws.amazon.com/cognito/.

Getting ready

To get started with this recipe, you need to know how to use the AWS console.

How to do it…

Let's create an identity pool using AWS Cognito:

  1. Log in to the AWS web console and navigate to Cognito at https...