Skip to content

func-api-users-post ​

Overview ​

Deploys the Lambda function that handles POST /users. Adds a user to the DynamoDB allowlist table as an invitation, permitting that email address through the Cognito pre-signup check. The route is authenticated via the Cognito JWT authorizer.

CloudFormation Stack ​

firefly-func-api-users-post

CloudWatch Logs ​

SettingValue
Log group/aws/lambda/firefly-func-api-users-post
Retention30 days

Dependencies ​

Deploy Dependencies ​

WorkflowReason
api-gatewayApiId and AuthorizerId resolved from stack outputs
dynamodb-usersTable must exist before function is deployed and granted write access

Delete Dependencies ​

None — this workflow has no prerequisites.

Required By ​

Required By Deploy ​

WorkflowReason
run-integration-testsEndpoint must be live before integration tests run

Required By Delete ​

WorkflowReason
delete-api-gatewayRoute registration must be removed before the API Gateway stack is deleted
delete-dynamodb-usersResource-based permissions referencing the table must be removed first

Deploy Workflow ​

Description ​

Resolves the HTTP API Gateway ID and JWT Authorizer ID from the firefly-api-gateway stack outputs, then performs a SAM build and deploy. The function is granted write access to the DynamoDB users table.

Steps ​

  1. Configure AWS credentials.
  2. Look up ApiId from the firefly-api-gateway stack output.
  3. Look up AuthorizerId from the firefly-api-gateway stack output.
  4. SAM build.
  5. SAM deploy firefly-func-api-users-post with parameters:
    • ApiId
    • AuthorizerId

Sequence Diagram ​

Deploy Sequence

Delete Workflow ​

Description ​

Calls sam delete to remove the Lambda function and its associated IAM role and API Gateway route integration.

Steps ​

  1. Configure AWS credentials.
  2. SAM delete firefly-func-api-users-post.

Sequence Diagram ​

Delete Sequence

Failure Scenarios ​

ScenarioBehavior
firefly-api-gateway stack not founddescribe-stacks returns an error; workflow fails before SAM deploy is attempted. Deploy api-gateway first.
Authorizer ID lookup failsDeploy fails; the JWT authorizer is created by the api-gateway stack — redeploy api-gateway to restore it.
DynamoDB users table not deployedFunction deploys successfully but returns errors at runtime when writing to the table. Deploy dynamodb-users first.