特に認証をしない匿名ユーザ向けの手順です
TL; DR
手順
IdentityPoolId から IdentityId を取得
curl -X POST \
https://cognito-identity.ap-northeast-1.amazonaws.com \
-H 'Content-Type: application/x-amz-json-1.1' \
-H 'x-amz-target: AWSCognitoIdentityService.GetId' \
-d '{ "IdentityPoolId": "ap-northeast-1:12341234-4321-4321-4321-123412341234" }'
↑で取得した IdentityId から Credentials(AccessKeyId, SecretKey, SessionToken, Expiration) を取得
curl -X POST \
https://cognito-identity.ap-northeast-1.amazonaws.com \
-H 'Content-Type: application/x-amz-json-1.1' \
-H 'x-amz-target: AWSCognitoIdentityService.GetCredentialsForIdentity' \
-d '{ "IdentityId": "ap-northeast-1:abcdabcd-4567-4567-4567-abcdabcdabcd" }'
以上。