Get your credentials using AWS Cognito.
In advance, create your Cognito identity pool in the AWS Management Console.
Enable “Access for Unauthenticated Identities” for the identity pool you just created, and set the required permissions in Unauthenticated Roles.
Set RegionIdentity Pool Identity.
Specifies the region in which the identity pool is located.
Specifies the ID of the identity pool.
It does not support getting authenticated roles by Cognito authenticated users.
We recommend that you set IAM for the access keys that you want to configure with only the minimum permissions necessary.
Privileges assigned to “Unauthenticated Roles” are effectively “Published Features/Anyone Can Use”.