Documentation
¶
Overview ¶
Command admin is the deployable Lambda entrypoint for the admin interface of the Authorization Service (create, revoke, extend, list), called by the CLI.
It is wiring only: it reads configuration from the environment, constructs a DynamoDB client from the Lambda execution role, and delegates to the existing auth.AdminHandler in internal/auth. No business logic lives here. AdminHandler.HandleRequest already routes by method+path and already maps state-conflict domain errors onto HTTP status codes (404 not found, 409 already-revoked/expired), so this entrypoint only translates the API Gateway proxy event into that call and maps the returned (status, body) back.
Environment variables (read once at cold start):
SHARE_RECORDS_TABLE_NAME (required) DynamoDB table holding share records.