skillfed

aws-cdk.aws-cognito

The CDK Construct Library for AWS::Cognito

aws-cdk-aws-cognito v1.204.0 150.4K downloads/30d#10,966 on PyPI12,868
Permissive license Apache-2.0 Active released

What it is and what it does

This package provides a Python construct library for AWS CDK v1 that lets you define Amazon Cognito user pools and related authentication infrastructure declaratively. It wraps CloudFormation resources and higher-level abstractions for common Cognito patterns like sign-up, sign-in with multiple aliases (username, email, phone), multi-factor authentication, Lambda triggers, and identity providers.

The library is stable for CloudFormation resources and user pool constructs, but Identity Pool L2 constructs are not implemented here. Critically, AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer maintained; AWS recommends migrating to CDK v2 for new projects and ongoing support.

Use it for:

  • Define a user pool with self-sign-up and email verification in a CDK stack without writing CloudFormation directly.
  • Configure sign-in options (username, email, phone) and multi-factor authentication for a web or mobile app.
  • Set up Lambda triggers for custom authentication flows or user lifecycle events in Cognito.
  • Grant IAM roles permissions to perform Cognito operations like admin user creation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides AWS CDK constructs for defining Amazon Cognito user pools and identity management infrastructure as code in Python.

No, unless you are maintaining an existing CDK v1 project. AWS CDK v1 is end-of-support since 2023-06-01 and receives no updates. New projects should use aws-cdk.aws-cognito from AWS CDK v2 instead, which is actively maintained and has a migration guide available.

Install

aws-cdk-aws-cognito on PyPI

pip

pip install aws-cdk-aws-cognito

uv

uv add aws-cdk-aws-cognito

poetry

poetry add aws-cdk-aws-cognito

Installing aws-cdk.aws-cognito

Before you install

Low install friction with a wheel distribution. However, this is AWS CDK v1, which reached end-of-support on 2023-06-01 and is no longer being updated; users should migrate to AWS CDK v2 instead.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions.

Quickstart

pip install aws-cdk.aws-cognito

from aws_cdk import aws_cognito as cognito

user_pool = cognito.UserPool(self, "myuserpool",
    user_pool_name="myawesomeapp-userpool"
)

AWS CDK v1 is end-of-support as of 2023-06-01; new projects should use AWS CDK v2 instead.

Verify before relying

  • Whether Identity Pool L2 constructs are available in this v1 package or only in the v2 alpha module.
  • Current adoption and migration timeline for projects still on CDK v1.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (~=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 10 — aws-cdk.aws-certificatemanager, aws-cdk.aws-iam, aws-cdk.aws-kms, aws-cdk.aws-lambda, aws-cdk.core, aws-cdk.custom-resources, constructs, jsii, publication, typeguard
Maintenance actively maintained — 1,152 days since the last release
Last repo commit
First released
Downloads 150,356/month — #10,966 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aws_cdk.aws_cognito-1.204.0-py3-none-any.whl

Development Status :: 7 - InactiveFramework :: AWS CDKFramework :: AWS CDK :: 1Intended Audience :: DevelopersLicense :: OSI ApprovedOperating System :: OS IndependentProgramming Language :: JavaScriptProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Typed

Tags

cognito user pool cdkaws authentication infrastructure as codecognito construct librarycdk user managementaws identity pool cdkcognito sign-in configurationcdk authentication setup
infrastructure-as-codeaws-cdkend-of-life

More Application Frameworks packages

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

textual

Textual is a Python framework for building…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

mcp

Build and connect to Model Context Protocol…

permissive · top 1,000 on PyPI

Werkzeug

Werkzeug is a WSGI utility library providing…

permissive · top 1,000 on PyPI

aws-cdk.aws-location-alpha

Provides AWS CDK constructs for building…

permissive · top 15,000 on PyPI

aws-cdk.aws-signer

Provides AWS CDK constructs for defining…

permissive · top 15,000 on PyPI

pycognito

Simplifies AWS Cognito user authentication and…

permissive · top 5,000 on PyPI

warrant

Warrant wraps AWS Cognito user management…

permissive · top 15,000 on PyPI

aws-cdk.aws-apigateway

Provides AWS CDK constructs for defining and…

permissive · top 15,000 on PyPI

aws-cdk.aws-imagebuilder

Provides AWS CDK L1 constructs for defining and…

permissive · top 15,000 on PyPI

aws-cdk.aws-iam

Provides Python constructs for defining AWS IAM…

permissive · top 15,000 on PyPI

aws-cdk.aws-acmpca

Provides AWS CDK constructs for working with…

permissive · top 15,000 on PyPI

aws-cdk.aws-codeguruprofiler

Provides AWS CDK constructs for defining and…

permissive · top 15,000 on PyPI

aws-cdk.aws-sqs

Provides AWS CDK constructs for defining Amazon…

permissive · top 15,000 on PyPI