I am trying to create a Cognito FederatedIdentityPool with CognitoUserPool as one Authentication Provider. Creating UserPool was easy enough:
I was able to figure our how to attach UserPool to Identity Pool
const userPool = new cognito.CfnUserPool(this, 'MyCognitoUserPool')
const userPoolClient = new cognito.CfnUserPoolClient(this, 'MyCognitoUserPoolClient', {
generateSecret: false,
userPoolId: userPool.userPoolId
});
const identityPool = new cognito.CfnIdentityPool(this, 'MyCognitoIdentityPool', {
allowUnauthenticatedIdentities: false,
cognitoIdentityProviders: [{
clientId: userPoolClient.userPoolClientId,
providerName: userPool.userPoolProviderName
}]
});
Still struggling with attaching Role to IdentityPool and don't know the difference between CfnUserPool and UserPool. However, this question can marked as partially resolved.