Engineering reference: the vendor onboarder architecture
Same system, drawn for engineers. Region, service names, resource identifiers, Bedrock model IDs, Lambda inventory, IAM scopes, the SES inbound rule set, EventBridge Scheduler config, the DynamoDB schemas, and the Function-URL upload and approve flow. Read alongside the previous six posts; this one’s the build sheet.
Region and account shape
Default region: ap-southeast-1 (Singapore). SES inbound, Bedrock cross-Region inference, Textract, and EventBridge Scheduler are all available there. A second region for multi-region resilience isn’t worth the extra setup work at SMB volume — the failure mode for an SMB is a vendor onboarded a day late, not a regional outage. One AWS account dedicated to the onboarder (separate from your other workloads) keeps the IAM blast radius small and lets a single AWS Budgets alarm cover the whole system.
Topology
Lambda functions
All Lambdas use the arm64 architecture, the smallest memory size that meets latency targets (typically 256 MB), Python 3.14 runtime, and CloudWatch Logs at 7-day retention. Each function has its own least-privilege IAM role. None run inside a VPC.
intake-form— Lambda Function URL, public withAuthType: NONE. Serves the owner-facing start form (GET) and handles the submit (POST). On submit, creates the vendor folder unders3://vo-documents/<vendor-id>/, writes avo-vendorsrow seeded from the checklist doc for the chosen type, and triggers the invite email via SES. The upload page for the vendor is served by the same function under a token-scoped path. Memory: 256 MB. Timeout: 15 s.intake-ses-parser— S3 PUT trigger ons3://vo-raw-mime/. Parses the forwarded MIME, calls Bedrock Haiku 4.5 (anthropic.claude-haiku-4-5-20251001-v1:0viaglobal.anthropic.claude-haiku-4-5-20251001-v1:0) to read the supplier name and contact, and posts an owner confirmation message with a one-tap vendor-type choice. On confirm, starts the vendor the same wayintake-formdoes. Memory: 256 MB. Timeout: 30 s.drive-sync— EventBridge Scheduler target, hourly. Uses the Google Sheets API (service-account credentials in Secrets Manager undervo/drive/sa) to read new vendor rows from the start sheet and start a vendor for each. Also writes each vendor’s checklist status back to the sheet for the owner-facing view. Memory: 256 MB. Timeout: 30 s.checker— S3 PUT trigger ons3://vo-documents/. Runs Textract viaStartDocumentTextDetection+StartDocumentAnalysis(asynchronously to handle multi-page documents). On Textract completion (via SNS notification), calls Bedrock Haiku 4.5 to read the document type and fields, then plain Python decides present-and-in-date against the checklist rules. Posts a one-tap confirmation to the owner; on confirm, marks the item done invo-vendors. For DOCX uploads (Textract doesn’t accept them), falls back topython-docx; XLSX usesopenpyxl. Both packages are stable and widely used in 2026 though lightly maintained — acceptable for a path that runs a few times per vendor; if precision becomes a concern, the active forkpython-docx-ossis a drop-in alternative. Memory: 512 MB. Timeout: 60 s.chase— EventBridge Scheduler target, daily at 9am local time (the schedule expression runs inTZ_NAMEset to the SMB’s timezone, e.g.Asia/Singapore). Readsvo-vendors, and for each vendor in the collecting state computes days-since-invite and the outstanding items, picks one of four moves (done/nudge/follow-up/escalate), and sends a reminder via SESSendRawEmaillisting only the missing items. On quiet-hours defer, creates a one-off EventBridge Scheduler rule. Writes a row tovo-chaseafter each send. When a vendor reaches done, emails the owner the approve-page link. Memory: 512 MB. Timeout: 60 s. No Bedrock calls.approve-handler— Lambda Function URL, public withAuthType: NONE; verifies a signed token on the request. Serves the owner’s approve page (GET) and handles Approve/Request-fix/Reject (POST). On approve, writes the vendor to the system of record via its API, sets an S3 Object Lock-style write-protection on the vendor prefix, marks the vendor approved, and writesvo-audit. On request-fix, re-opens one checklist item and re-arms the chase for it. On reject, closes the file with a reason. Memory: 256 MB. Timeout: 15 s.digest— EventBridge Scheduler target, weekly Monday 9am. Readsvo-vendorsandvo-chase; sends the owner a summary of vendors collecting, ready-to-approve, and approved that week. No Bedrock; a plain summary table. Memory: 256 MB.
Storage
- DynamoDB ·
vo-vendors— one row per vendor. PKvendor_id; attributes:name,contact_email,type,internal_owner,state(collecting/ready/approved/rejected),invited_at, and achecklistmap ofitem → {status, present, in_date, expiry, confirmed_by, confirmed_at}. On-demand. - DynamoDB ·
vo-chase— one row per reminder sent. PK(vendor_id, sent_date); attributes:move(nudge/follow-up/escalate),recipient,missing_items. On-demand. - DynamoDB ·
vo-audit— one row per write action of any kind. PK(vendor_id, ts); attributes:action(approved/request_fix/rejected/item_confirmed),by_user,snapshot. On-demand. No TTL — this is the long-term audit trail. - S3 ·
vo-documents— one prefix per vendor holding the uploaded documents. Versioning enabled; write-protection applied to a vendor prefix on approval. Lifecycle to Glacier at 90 days; expiry at 7 years. - S3 ·
vo-rules-source— mirrored checklist and voice docs as plain text. Versioning enabled. - S3 ·
vo-raw-mime— raw inbound MIME from forwarded supplier emails. Lifecycle to Glacier at 30 days; expiry at 7 years.
Bedrock and Textract
- Foundation model.
anthropic.claude-haiku-4-5-20251001-v1:0via the Global cross-Region inference profileglobal.anthropic.claude-haiku-4-5-20251001-v1:0. Two callsites:checkerfor reading uploaded documents, andintake-ses-parserfor reading the supplier name and contact off a forwarded email. A heaviersummary-style narrative isn’t needed here; if you later add a quarterly vendor-base report, route that one call toanthropic.claude-sonnet-4-6-20250930-v1:0for the longer reasoning. - Textract.
StartDocumentTextDetectionfor plain document text andStartDocumentAnalysiswith the FORMS feature for key-value pairs (tax-ID, account number, expiry date). Async, with completion via SNS to thecheckerLambda. - Embeddings. Not used. The checklist is structured rows; deterministic lookup beats vector retrieval here. No Knowledge Base, no S3 Vectors. (If you ever add “find similar past vendors,” that’s when Amazon Titan Text Embeddings V2 at 1024-dim plus S3 Vectors would earn its place — not before.)
EventBridge Scheduler config
vo-daily-chase—cron(0 9 * * ? *)in the SMB’s timezone. Target:chaseLambda.vo-drive-sync—rate(1 hour). Target:drive-syncLambda.vo-weekly-digest—cron(0 9 ? * MON *)in TZ. Target:digestLambda.- One-off rules — created on the fly by
chasewhen a quiet-hours defer is needed. Useat(YYYY-MM-DDTHH:MM:SS)expressions with--action-after-completion DELETEso the rule self-cleans.
SES inbound and outbound
- Set the MX record on a dedicated subdomain (e.g.
vendors.your-company.com) toinbound-smtp.ap-southeast-1.amazonaws.com. - SES inbound rule set
vo-inbound-rules: one rule with recipientvendors@your-company.com→ spam scan → S3 PUT tos3://vo-raw-mime/<message-id>→ stop. The S3 PUT triggersintake-ses-parser. - SES outbound for invites, reminders, and the approve-page email: verify a sender identity at
onboarding@your-company.comwith DKIM and SPF on the parent domain. Out of sandbox by request.
IAM (least privilege per Lambda)
Each Lambda has its own role with policies scoped to exact ARNs. Sketch:
- chase role:
dynamodb:Query+GetItemonvo-vendors;dynamodb:PutItemonvo-chase;ses:SendRawEmailfrom the verified sender identity;scheduler:CreateSchedulefor the deferred-send one-offs. Nobedrock:*. - checker role:
s3:GetObjectonvo-documents;textract:StartDocumentTextDetection+StartDocumentAnalysis+GetDocument*;bedrock:InvokeModelon the Haiku ARN;dynamodb:UpdateItemonvo-vendors;dynamodb:PutItemonvo-audit. - approve-handler role:
dynamodb:UpdateItemonvo-vendors;dynamodb:PutItemonvo-audit;secretsmanager:GetSecretValueon the accounting-tool API secret;s3:PutObjectRetentionon the vendor prefix; outbound network access to the accounting tool’s API host. - intake-form and intake-ses-parser roles:
s3:PutObjectonvo-documentsand read onvo-raw-mime;dynamodb:PutItemonvo-vendors;ses:SendRawEmail;bedrock:InvokeModel(parser only). - drive-sync role:
secretsmanager:GetSecretValueon the Google service-account secret;dynamodb:Query+PutItemonvo-vendors; outbound network tosheets.googleapis.com.
Upload and approve flow
Both vendor-facing and owner-facing surfaces are Lambda Function URLs, never API Gateway. The vendor’s upload page is served by intake-form under a path carrying a long random per-vendor token (stored on the vo-vendors row); the token scopes the page to one vendor so nobody can reach another’s documents. Uploads use a short-lived S3 presigned PUT URL minted by the Function URL, so the file goes straight to vo-documents and the S3 PUT triggers checker. The owner’s approve page is served by approve-handler under a separate signed token with a short TTL; the Approve/Request-fix/Reject actions POST back to the same function, which verifies the token before doing anything. There is no account and no password on either side.
Observability and cost gates
- CloudWatch Logs: all Lambdas, 7-day retention, structured JSON. Subscription filter on
"error"+"throttle"+"timeout"to a CloudWatch metric for alerting. - Alarms: chase Lambda failures > 0 in a day (the daily tick has to run); checker failure rate > 1% in 24h; approve-handler token-verification failures > 5/hour (might mean a leaked or stale link).
- X-Ray: off by default. Not worth the cost at SMB volume.
- AWS Budgets: $20/month threshold, alarm at 80% and 100%, posts to SNS topic
vo-cost-alarmsubscribed to the on-call admin’s email.
Config and secrets
Service-account credentials for the Sheets API live in Secrets Manager under vo/drive/sa. The accounting-tool API key (for writing approved vendors to the system of record) lives under vo/system-of-record/api. The configured timezone, quiet-hours window, chase cadence defaults, and the per-type checklist reference all live in Parameter Store under /vo/config/. Lambdas fetch config on cold start and cache for the lifetime of the execution environment.
Deploy
GitHub Actions with OIDC into a deploy role (no long-lived keys) and AWS SAM. The opinionated bits: deploy the SES rule set as a separate stack (rule-set changes affect mail flow), turn on S3 versioning for vo-documents and vo-rules-source so a bad upload or doc edit can be rolled back, and version the EventBridge Scheduler timezone setting so you don’t accidentally start running the daily chase in UTC after a CI rotation. Total deployable surface: around seven Lambdas, three DDB tables, three S3 buckets, the Scheduler rules, one SES rule set, and one Budgets alarm.
That’s the full system. Six narrative posts and this engineering reference. If you want to talk about adapting it for your business, see Work with me.
All posts