I am trying to create a Cognito FederatedIdentityPool with CognitoUserPool as one Authentication Provider. Creating UserPool was easy enough:
The CDK must have changed this was created. I got it working with the example from @CCarlos:
const pool = new cognito.CfnUserPool(this, "cdkUserpool", {
userPoolName: "cdkUserPoolName",
usernameAttributes: ["email"],
});
const client = new cognito.CfnUserPoolClient(this, "cdkClient", {
userPoolId: pool.ref, // <--- This part has changed.
explicitAuthFlows: ["ADMIN_NO_SRP_AUTH"],
generateSecret: false,
readAttributes: [
"preferred_username",
"website",
"email",
"name",
"zoneinfo",
"phone_number",
"phone_number_verified",
"email_verified",
],
writeAttributes: ["name", "zoneinfo", "phone_number"],
});