Two possible approaches – differing in how credentials are used (i.e what kind of credentials are embedded in your app).

EMBEDDING COGNITO IDENTITY POOL ID IN APPLICATION

The advantage of this approach is that you do not have to embed the Access Key, Secret Key in your code – for example in a android application. Amazon creates temporary credentials for use by your client application.