Skip to content

v4.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 11 Feb 07:26
· 7 commits to master since this release

This release is also available on:


4.0.0 (2025-02-11)

  • fix!: user pool creation race conditions (69ee1e1)

BREAKING CHANGES

  • You must create a User Pool before using it (by calling
    createUserPool). Previously, User Pools would be created on-demand.

User Pools (and their associated databases) used to be created lazily
when first accessed, this was intended to to allow low-touch setup of
cognito-local by creating user pools with default options if they don't
exist, but it has been a source of obscure corruption issues for a
while. It's been possible to create race conditions by making requests
to cognito-local in parallel before a User Pool was created, and those
parallel requests would stomp on each other by creating multiple
databases.

This change removes the laziness: Any existing User Pools will be parsed
when cognito-local first starts, and new User Pools are created when
createUserPool is called. Any attempts to access User Pools which don't
exist will fail with a ResourceNotFound error.