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:
- Log in to the AWS web console and navigate to...