Infrastructure
The Float Service is deployed entirely on AWS using Terraform. All infrastructure is defined in deploy/ and managed per-environment (test, prod). The application identifier is floats.
Lambda Functions
| Function | Trigger | Timeout | Memory | Key IAM Permissions |
|---|---|---|---|---|
|
API Gateway ( |
300s |
default |
DynamoDB read/write (float-service table, collection-history, locks, requirements-bypass); EventBridge PutEvents (floatme-events bus); execute-api:Invoke (Payments, Underwriting, User Service, TXN Service, Insight Service, Subscription Service, LOC Service); RDS, GrowthBook, Segment, Iterable, AppsFlyer secrets |
|
EventBridge ( |
900s |
1024 MB |
SQS SendMessage (prod-floats-collections); RDS replica secret |
|
SQS ( |
540s |
512 MB |
DynamoDB read/write (collection-history, locks); execute-api:Invoke (Payments, Underwriting, User Service, TXN Service); RDS main/replica, Segment, Iterable, GrowthBook, AppsFlyer secrets |
|
Kinesis ( |
840s |
default |
DynamoDB read/write (collection-history); execute-api:Invoke (User Service, Underwriting, Admin API); RDS main/replica, Segment, Iterable, AppsFlyer secrets |
|
SQS ( |
540s |
512 MB |
DynamoDB read/write (collection-history, locks); execute-api:Invoke (Payments, User Service, TXN Service, Underwriting); RDS main/replica, Segment, Iterable, GrowthBook, AppsFlyer secrets |
|
SQS ( |
810s |
512 MB |
DynamoDB read/write (collection-history, locks); execute-api:Invoke (Payments, User Service, TXN Service, Underwriting); RDS main/replica, Segment, Iterable, GrowthBook, AppsFlyer secrets |
|
EventBridge ( |
900s |
512 MB |
SQS SendMessage (prod-floats-prenotes); RDS replica and GrowthBook secrets |
|
SQS ( |
540s |
512 MB |
SQS Receive/Delete/GetQueueAttributes (prod-floats-prenotes); execute-api:Invoke (Payments, User Service); RDS replica secret |
|
SQS ( |
54s |
default |
DynamoDB read/write (collection-history, locks); execute-api:Invoke (Payments, User Service, Underwriting); RDS main/replica, Segment, Iterable, AppsFlyer secrets |
|
EventBridge schedule (daily 12:00 UTC; disabled in non-prod) |
900s |
128 MB |
RDS replica, Slack secrets |
All Lambdas run inside the shared FloatMe VPC (private subnets, PrivateSG security group) to access RDS.
DynamoDB Tables
| Table | Region | Entity Types | Streams | Notes |
|---|---|---|---|---|
|
us-east-2 (primary) |
Bypass records, float-service single-table entities |
No |
Primary single-table for the float service. Region is configurable via |
|
us-east-1 in prod; current region in test |
Collection attempt log entries |
No |
Read/written by all collection Lambdas. Keys by |
|
us-east-1 in prod; current region in test |
Distributed lock records (cirello.io/dynamolock) |
No |
Used to serialise concurrent collection attempts. 60s lease, 1s heartbeat. |
|
us-east-1 in prod; current region in test |
Per-user bypass records |
No |
Written by the API Lambda. Read during float creation to skip underwriting. |
Legacy tables (collection-history, locks, requirements-bypass) do not carry an environment prefix — they were created before per-environment namespacing and are shared by multiple services.
SQS Queues
| Queue | Visibility Timeout | Max Receive Count | DLQ | Purpose |
|---|---|---|---|---|
|
600s |
1 |
|
Receives float collection jobs from the scheduler. Consumed by the collections-worker. |
|
60s |
(none configured) |
None |
Receives batch collection requests. Consumed by the batch-worker. |
|
900s |
1 |
|
Receives income detection events from EventBridge (source: |
|
900s |
1 |
|
Receives balance update events from EventBridge (source: |
|
600s |
1 |
|
Legacy webhook queue. Event source mapping is disabled — the webhook-worker now consumes from |
|
600s |
1 |
|
Receives prenote submissions from the prenote-scheduler. Consumed by the prenote-worker with batch size 10 and reserved concurrency of 3. |
Kinesis Streams
| Stream | Direction | Producers | Consumers | Purpose |
|---|---|---|---|---|
|
Inbound (external) |
Payments Service |
|
ACH settlement events from the Payments Service. The ach-handler filters for five event types: |
ACH handler Kinesis configuration:
-
Batch size: 100 (configurable via
kinesis_stream_batch_size) -
Parallelization factor: 2 (configurable via
user_kinesis_stream_parallelization_factor) -
Starting position:
LATEST -
Error handling:
BisectBatchOnFunctionErrorenabled
EventBridge
| Bus / Rule | Purpose |
|---|---|
|
Internal domain event bus. The API Lambda publishes |
|
|
|
|
|
Filters |
|
Filters |
|
|
|
|
Secrets Manager
All secrets are namespaced by environment (site/…).
| Secret Path | Purpose |
|---|---|
|
RDS main instance connection credentials (host, port, user, password, database). Used by the API, collections-worker, ach-handler, webhook-worker, webhook-worker-balance, and batch-worker Lambdas. |
|
RDS read-replica connection credentials. Used by the collections-scheduler, prenote-scheduler, and reporter Lambdas (read-only queries), and by all collection Lambdas as a fallback for float lookups. |
|
Segment write key for analytics events. Used by the API, collections-worker, ach-handler, webhook-worker, webhook-worker-balance, and batch-worker Lambdas. |
|
Iterable API key for transactional email and push notifications. Used by the API, collections-worker, ach-handler, webhook-worker, webhook-worker-balance, and batch-worker Lambdas. |
|
AppsFlyer API key for mobile attribution events. Used by the API, collections-worker, ach-handler, webhook-worker, webhook-worker-balance, and batch-worker Lambdas. |
|
GrowthBook SDK key for feature flag evaluation. Used by the API, collections-worker, webhook-worker, webhook-worker-balance, and prenote-scheduler Lambdas. |
|
Slack webhook URL for posting daily origination reports. Used only by the reporter Lambda. |
|
Datadog API and app keys. Used by Terraform to configure Datadog SLOs and the service catalog entry. |
API Gateway
| Gateway | Auth | Purpose |
|---|---|---|
|
AWS IAM (SigV4) |
Internal API for all float management operations. All routes ( |
Scheduled Jobs
| Lambda | Schedule | Purpose |
|---|---|---|
|
|
Queries RDS for floats in |
|
|
Queries RDS for floats in |
|
|
Queries the RDS read replica for floats in |
|
|
Queries the RDS read replica for float origination data over the last 10 days, grouped by loan type. Posts a summary to Slack |
Monitoring
Datadog SLOs are defined for five Lambdas (api, collections-scheduler, collections-worker, ach-handler, webhook-worker):
-
Error SLO — 99.9% target / 99.99% warning over 7-day and 30-day windows
-
Throughput SLO — 99.9% target / 99.99% warning over 7-day and 30-day windows
-
Latency SLO — 99.9% target / 99.99% warning over 7-day and 30-day windows (scheduler and webhook-worker only)
Terraform Structure
All infrastructure is defined in deploy/:
| File | Contents |
|---|---|
|
AWS provider config (6 aliases for cross-region resources), locals for all derived names and region overrides, data sources for all external resources (DynamoDB tables, API Gateways, Kinesis stream, EventBridge bus). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Secrets Manager data source references for all secrets used by the service. |
|
Data sources for the shared FloatMe VPC, private subnets, and PrivateSG security group. |
|
Datadog SLOs (error, throughput, latency) and the Datadog service catalog definition. |
|
All configurable parameters: environment, application, table/stream/queue names, service region overrides, collection thresholds, app version constraints, and float amount limits. |
Related Pages
-
Architecture — System context diagram and component overview
-
Event Flows — EventBridge events published and consumed, SQS queue flow details
-
ACH Processing — Kinesis-based ACH settlement callbacks
-
Collections Engine — How scheduled and webhook collection runs use these queues
-
DynamoDB Tables — Full schemas for collection-history, locks, and requirements-bypass