Skip to content

func-api-users-delete

Description

Removes a user from the Cognito User Pool and from the firefly-users allowed list. If the user has not yet signed in (allowed list entry only, no Cognito account), only the allowed list entry is removed.

The function enforces the last super user constraint: the deletion is rejected if the target user is a super user and they are the only remaining super user in the pool.

Super user access is required.

Invocation

Invoked by API Gateway on an HTTP DELETE /users/{email} request.

API Endpoints

MethodPathAuthDescription
DELETE/users/{email}Super userDelete a user

Response Codes

CodeReason
200 OKUser deleted
403 ForbiddenCaller is not a super user
404 Not FoundUser not found
409 ConflictTarget is the last super user

See the API Reference for full schema documentation.

Deployment

See the deployment workflow documentation for workflow steps, infrastructure dependencies, and failure scenarios.