PATTERN Cited by 1 source
Hybrid cloud testing¶
Pattern¶
For cloud services that cannot be fully emulated locally, keep cloud feedback lightweight: stand up a minimal dev stack via IaC, exercise it through the AWS SDK (or equivalent), validate, and tear it down. The cloud is treated as "another test dependency — used sparingly and predictably", not as the default iteration tier.
Named by the 2026-03-26 AWS Architecture Blog post:
"Some AWS services cannot be fully emulated locally. In these cases, the goal is not to avoid the cloud, but to keep cloud feedback lightweight."
"For event-driven systems using Amazon Simple Notification Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS), you can define minimal development stacks using infrastructure as code (IaC) tools such as AWS CloudFormation or the AWS Cloud Development Kit (AWS CDK). An AI agent can deploy small, isolated resources, invoke them through the AWS SDK, and validate behavior without provisioning full environments."
"Hybrid testing confirms real service behavior early while keeping cloud usage focused and controlled."
Canonical gap hybrid testing fills¶
| Service | Local emulator available? | Hybrid-testing shape |
|---|---|---|
| Lambda / API Gateway | Yes (systems/aws-sam) | Local-first |
| DynamoDB | Yes (systems/dynamodb-local) | Local-first |
| ECS / Fargate | Yes (same-image local run) | Local-first |
| SNS | No | Hybrid — small real topic |
| SQS | No | Hybrid — small real queue |
| Step Functions | LocalStack partial | Hybrid for realistic flows |
| EventBridge | Partial | Hybrid for rule routing |
The pattern sits between patterns/local-emulation-first (cheaper, faster, bounded by emulator fidelity) and patterns/ephemeral-preview-environments (full-app, more expensive, longer-lived).
Why the agent benefits¶
- Real behavior of the real service — retry semantics, delivery guarantees, throttling, filter-expression evaluation — all of which differ between an emulator's approximation and the real service.
- Still fast — "small, isolated resources" provision in seconds to a minute, not the many minutes a full preview stack needs.
- Bounded blast radius — minimal stacks use dedicated resource names + tags, easy to scope IAM and delete.
Operational discipline¶
- Dedicated dev account for hybrid dev stacks — see multi-account patterns.
- TTL tags so forgotten stacks get swept nightly.
- IAM least-privilege for the agent's deploy role.
- Teardown as part of the test contract — the agent is expected to clean up on session exit.
Caveats (not addressed in the 2026-03-26 post)¶
- Cost model — hybrid testing burns cloud resources on every iteration; economics hold only if the stacks stay "minimal".
- Eventually-consistent behaviors — hybrid tests against real services must tolerate the same consistency semantics production does; flaky assertions are an anti-pattern.
- Quota pressure under many-agent scale — a shared dev account running N agents × M iterations can hit account quotas.
Seen in¶
- sources/2026-03-26-aws-architecting-for-agentic-ai-development-on-aws — pattern introduction; SNS + SQS named as the canonical no-local-emulator workloads that drive the pattern.