End-to-End QA Scenario
Serverless Nightly Regression Automation
EventBridge schedules nightly automation. Step Functions seeds data, fans out API + UI suites in parallel, aggregates results.
Architecture
EventBridge (cron 0 2 * * ?) ─► Step Functions State Machine
├─► Lambda: seed DynamoDB fixtures
├─► Parallel
│ ├─► Lambda: API tests (Newman)
│ └─► Fargate Task: Playwright UI tests (sharded)
├─► Lambda: aggregate JUnit → HTML
├─► S3: upload report
├─► DynamoDB: persist run metadata (TTL 90d)
└─► SNS ─► Slack + emailWorkflow steps
- 1
Trigger
EventBridge rule with cron(0 2 * * ? *) starts execution every night at 02:00 UTC.
- 2
Provision data
Lambda seeds DynamoDB tables with deterministic fixtures keyed by runId.
- 3
Parallel automation
Parallel state runs Newman (API) in Lambda and Playwright (UI) shards in Fargate concurrently.
- 4
Aggregate
Lambda merges JUnit XMLs into HTML and computes pass/fail + duration deltas vs. last 7 runs.
- 5
Persist
Run metadata in DynamoDB with TTL; raw artifacts in S3 (lifecycle to Glacier after 30 days).
- 6
Notify
SNS posts a summary card to #qa-nightly with links to the report and trend chart.
Key takeaways
- Zero idle infrastructure — pay only during the nightly window.
- Step Functions gives a visual, debuggable history of every run.
- Trend deltas surface regressions before they become production incidents.
