AWS Cognito User Pool
Create a Cognito User Pool with a hosted UI domain, client, and identity pool.
const userPool = new sst.aws.CognitoUserPool("MyUserPool", { domain: { prefix: `my-app-${$app.stage}`, }, triggers: { preSignUp: { handler: "index.handler", }, },});
const client = userPool.addClient("Web", { callbackUrls: ['https://example.com/auth/callback']});
const identityPool = new sst.aws.CognitoIdentityPool("MyIdentityPool", { userPools: [ { userPool: userPool.id, client: client.id, }, ],});export async function handler() {}View the full example.