cmstosocial
Event-driven CMS-to-social syndication worker. It has no deployed HTTP routes; production traffic arrives through SNS-to-SQS delivery from the purge post-transition topic.
| Field | Value |
|---|---|
| Serverless service | drive-api-cmstosocial |
| Runtime | nodejs20.x, arm64 |
| Region | ap-southeast-2 |
| Deployed HTTP operations | 0 |
| Local worker harnesses | 0 |
| OpenAPI | /openapi/cmstosocial.yaml |
Deployed routes
No deployed HTTP routes. This service is event-driven.
Behaviour notes
queueProcessorconsumescmstosocialQueuewithbatchSize: 1,reservedConcurrency: 1, and a 300 second timeout.cmstosocialQueuesubscribes to the purge service post-transition SNS topic and filters message attributes topostTypevaluesnews,caradvice, andreviews.- The worker skips non-new post updates, enriches post data from WPGraphQL, generates copy through
@caradvice/drive-aiusing OpenRouter/Portkey config, and creates or updates Brandwatch Facebook drafts. - DynamoDB table
socialPublishJobsstores idempotency/status records keyed bywordpress#{postType}#{postId}andversion#{modifiedGmt}. ENABLE_EXTERNAL_APIS=trueopt-in is required for real external calls in non-prod. Prod calls real LLM/Brandwatch APIs by default.dlqProcessorconsumescmstosocialDLQ, sends Slack notifications according toSLACK_LOG_LEVEL, and acknowledges terminal failures.
Source map
- Routes and triggers:
services/cmstosocial/serverless.yml - Worker:
services/cmstosocial/functions/queueProcessor.ts - DLQ handler:
services/cmstosocial/functions/dlqProcessor.ts - Message shape:
services/cmstosocial/types/index.ts - Utility clients:
services/cmstosocial/util/