Skip to main content

Deployment Architecture

Diagram

Resources

The Cognito stack provisions 4 resources.

Logical IDTypeDescription
CognitoUserPoolAWS::Cognito::UserPoolUser Pool with Advanced Security Mode set to ENFORCED. Self-registration is disabled (AllowAdminCreateUserOnly: true). Email is auto-verified. Password policy requires uppercase, lowercase, numbers, symbols, and a configurable minimum length. Deletion protection is parameterized.
CognitoUserPoolClientAWS::Cognito::UserPoolClientApp client configured for OAuth 2.0 Authorization Code Grant only. Scopes: openid, profile, email. Access and ID tokens valid for 8 hours; refresh tokens valid for 24 hours. PreventUserExistenceErrors is enabled. No client secret is generated (public client for SPA use). Supports USER_PASSWORD_AUTH, USER_SRP_AUTH, and REFRESH_TOKEN_AUTH explicit auth flows.
CognitoUserPoolDomainAWS::Cognito::UserPoolDomainCustom domain prefix for the Cognito Hosted UI. Uses Managed Login version 2. The domain prefix must be globally unique and must not contain reserved words (cognito, aws, amazon).
ManagedLoginBrandingAWS::Cognito::ManagedLoginBrandingManaged Login UI branding configuration. Uses Cognito-provided default values. Depends on the domain resource to ensure the domain is registered before branding is applied.

Security Summary

ControlConfiguration
Advanced Security ModeENFORCED -- enables adaptive authentication, compromised credential detection, and risk-based challenges.
Self-RegistrationDisabled. Only administrators can create user accounts (AllowAdminCreateUserOnly: true).
User Enumeration PreventionEnabled. PreventUserExistenceErrors returns generic error messages to prevent attackers from discovering valid usernames.
OAuth FlowAuthorization Code Grant only. Implicit grant and client credentials grant are not permitted.
OIDC ScopesRestricted to openid, profile, and email. No custom scopes are defined.
Password PolicyRequires uppercase, lowercase, numbers, and symbols. Minimum length defaults to 8 (configurable up to 99).
Token ValidityAccess and ID tokens: 8 hours. Refresh tokens: 24 hours. Values are hardcoded in the template.
MFANot enabled. Mitigated by Advanced Security Mode adaptive challenges and admin-only user creation.
IAMNo IAM roles or policies are created by this stack. No --capabilities flag is required for deployment.
Deletion ProtectionParameterized. Set to ACTIVE for production environments to prevent accidental stack deletion from destroying the User Pool.