Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
252 commits
Select commit Hold shift + click to select a range
86f5d55
test(terraform): add §H/§O fixtures + document §G/§H/§O progress
Jun 10, 2026
3973005
parity(§P): pass-4 line-level fixes across 12 services
Jun 10, 2026
c3b6b33
dashboard: add §E backend-only service pages (18 services)
Jun 10, 2026
16f14eb
parity(§R): Cognito auth correctness fixes
Jun 10, 2026
57a47b6
parity(§R): CloudFormation error-code & intrinsic fidelity
Jun 10, 2026
ff1e7fc
parity(§Q): RolesAnywhere pagination correctness
Jun 10, 2026
aa4ab25
parity(§Q/§R): OpsWorks error status + VerifiedPermissions desc bound
Jun 10, 2026
05118cd
parity(§R): bound list MaxResults on EMR Serverless & MediaStore Data
Jun 10, 2026
c3bd176
parity(§Q/§R): IdentityStore & Batch list-input validation
Jun 10, 2026
7c9abad
parity(§Q): Polly NextToken omitempty + API GW Mgmt GoneException shape
Jun 10, 2026
7b9e3da
parity(§Q): S3Control priority + Account PutAlternateContact validation
Jun 10, 2026
6153ff4
parity: lint cleanup for pass-5/6 fixes
Jun 11, 2026
03953a7
parity: document §Q/§R pass-5/6 status
Jun 11, 2026
256544a
dashboard: §F UI features for SQS, SNS, KMS, Secrets Manager
Jun 10, 2026
90b4b1e
dashboard: §F UI features for SSM and Lambda
Jun 11, 2026
1067813
dashboard: §F result export for Athena + CloudWatch Logs; parity.md s…
Jun 11, 2026
2c95cdf
parity(§I/§N): seedable Inspector2 findings, NextToken pagination, re…
Jun 11, 2026
5eb5c60
parity(§I): populate Forecast GetAccuracyMetrics with deterministic b…
Jun 11, 2026
0a183c0
parity: document §I/§N pass-7 status (implemented + false-positives +…
Jun 11, 2026
34c2d45
feat(cloudformation): §K pass-1 — 22 new CFN resource types
Jun 11, 2026
ae5e341
dashboard: §F second pass — popular-services UI features
Jun 11, 2026
2650993
feat(platform): opt-in TLS listener + SigV4 validation; §M wiring ver…
Jun 11, 2026
624dd73
dashboard: §F third pass — non-popular per-service UI features
Jun 11, 2026
2318ee0
feat(parity): CFN intrinsic-error propagation + §N structural items
Jun 11, 2026
917ca19
dashboard: §F fourth pass — more non-popular per-service UI features
Jun 11, 2026
a103028
batch: lazy-init CloudWatch Logs client so page renders under test mocks
Jun 11, 2026
c4ec448
ui: §F pass 5 — Polly lexicon, X-Ray annotations, AppSync pipeline, G…
Jun 11, 2026
507de53
ui: §F pass 6 — ML/AI/media group (Bedrock playground, SageMaker A/B,…
Jun 11, 2026
f932cfe
ui: §F pass 6 — Data/Storage/Networking group (FSx, Glue, Athena, Ope…
Jun 11, 2026
bdaa586
ui: §F pass 6 — Security/identity + Messaging service group
Jun 11, 2026
bccb498
fix(dashboard): restore static/spa/.keep so go:embed all:static/spa r…
Jun 11, 2026
1d1e4d8
test(integration): fix Batch ListJobs all-queues for required jobQueue
Jun 11, 2026
18f2c3d
fix(parity): wire §G services + align SDK wire format for integration…
Jun 11, 2026
37ea992
fix(parity): repair remaining §G integration tests
Jun 11, 2026
39f1044
fix(mediapackage): disambiguate shared /channels route by SigV4 service
Jun 11, 2026
77a89ad
fix(parity-§H): repair FSx Lustre, SecurityHub, MediaStore & AppConfi…
Jun 11, 2026
6e6377e
fix(security): bound S3 maxKeys conversion + remove avoidable nolints
Jun 11, 2026
00b3005
parity: region isolation for secretsmanager, acm, acmpca, scheduler, …
Jun 11, 2026
81ca034
parity: region-isolation tests for glacier + sqs (Batch 2 partial)
Jun 11, 2026
222d64f
parity: context-based region isolation for dms
Jun 11, 2026
3a44248
parity: context-based region isolation for efs
Jun 11, 2026
f782873
parity(batch): context-based region isolation
Jun 11, 2026
205a11f
parity(kinesis): context-based region isolation
Jun 11, 2026
519c765
test: pass ctx to region-isolated backend calls in e2e tests
Jun 11, 2026
064613d
feat(mwaa): context-based region isolation
Jun 11, 2026
37ca07c
feat(elb): context-based region isolation for Classic ELB
Jun 11, 2026
521aaef
parity(neptune): context-based region isolation
Jun 11, 2026
9cf27ed
feat(kafka): context-based region isolation for MSK
Jun 11, 2026
65b263f
feat(elasticsearch): context-based region isolation
Jun 11, 2026
9f628fa
feat(emr): context-based region isolation
Jun 11, 2026
82b130a
feat(directoryservice): context-based region isolation
Jun 11, 2026
1a03896
feat(codepipeline): context-based region isolation
Jun 11, 2026
775fd27
Merge region-isolation into mega-v2 (collapse to single parity PR)
Jun 11, 2026
e8ecd97
fix(cfn): pass ctx to region-isolated secretsmanager calls (post-merge)
Jun 11, 2026
2d99d57
WIP: checkpoint (auto)
Jun 11, 2026
df8df73
WIP: checkpoint (auto)
Jun 11, 2026
ef2d244
WIP: checkpoint (auto)
Jun 11, 2026
577621a
WIP: checkpoint (auto)
Jun 11, 2026
13ca179
parity: region isolation for secretsmanager, acm, acmpca, scheduler, …
Jun 11, 2026
f89f2c1
parity: region-isolation tests for glacier + sqs (Batch 2 partial)
Jun 11, 2026
e758c44
parity: context-based region isolation for dms
Jun 11, 2026
a55b52a
parity: context-based region isolation for efs
Jun 11, 2026
1260050
parity(batch): context-based region isolation
Jun 11, 2026
2ee1728
parity(kinesis): context-based region isolation
Jun 11, 2026
c5f955a
test: pass ctx to region-isolated backend calls in e2e tests
Jun 11, 2026
a6ed198
feat(mwaa): context-based region isolation
Jun 11, 2026
9068344
feat(elb): context-based region isolation for Classic ELB
Jun 11, 2026
8289659
parity(neptune): context-based region isolation
Jun 11, 2026
b03ac42
feat(kafka): context-based region isolation for MSK
Jun 11, 2026
3eba0c8
feat(elasticsearch): context-based region isolation
Jun 11, 2026
a418ff6
feat(emr): context-based region isolation
Jun 11, 2026
8f7f3b9
feat(directoryservice): context-based region isolation
Jun 11, 2026
f26cc7a
feat(codepipeline): context-based region isolation
Jun 11, 2026
39b027f
fix(cfn): pass ctx to region-isolated secretsmanager calls (post-merge)
Jun 11, 2026
5e99411
feat(resourcegroups): context-based region isolation
Jun 11, 2026
ec790ac
feat(identitystore): context-based region isolation
Jun 11, 2026
2d828fc
feat(mediastoredata): context-based region isolation
Jun 11, 2026
f2be5d4
feat(textract): context-based region isolation (go-07ui)
Jun 11, 2026
ff3d375
Merge region-isolation: go-939s@mq9mqhk5 into mega PR
Jun 11, 2026
10bd2b8
Merge region-isolation: go-07ui@mq9mpvc8 into mega PR
Jun 11, 2026
aa066af
Merge region-isolation: go-uu7u@mq9mzc7i into mega PR
Jun 11, 2026
9c0a23a
Merge region-isolation: go-880a@mq9mzxyj into mega PR
Jun 11, 2026
5870ffe
WIP: checkpoint (auto)
Jun 11, 2026
8329a92
feat(rolesanywhere): context-based region isolation (go-e450)
Jun 11, 2026
de6d76a
WIP: checkpoint (auto)
Jun 11, 2026
f9a0385
WIP: checkpoint (auto)
Jun 11, 2026
5da3279
WIP: checkpoint (auto)
Jun 11, 2026
a3f1386
WIP: checkpoint (auto)
Jun 11, 2026
2aedf22
WIP: checkpoint (auto)
Jun 11, 2026
325e31d
WIP: checkpoint (auto)
Jun 11, 2026
dbbf0b6
WIP: checkpoint (auto)
Jun 11, 2026
7e3b01e
WIP: checkpoint (auto)
Jun 11, 2026
bb618a2
Merge region-isolate rolesanywhere (go-e450) into mega PR
Jun 11, 2026
0034465
WIP: checkpoint (auto)
Jun 12, 2026
49afd6a
WIP: checkpoint (auto)
Jun 12, 2026
fffdb19
WIP: checkpoint (auto)
Jun 12, 2026
3c81dee
WIP: checkpoint (auto)
Jun 12, 2026
0db3008
fix(codeconnections): add isolation_test.go, fix ctx in test callers …
Jun 12, 2026
cd007cd
feat(codestarconnections): context-based region isolation (go-drfr)
Jun 12, 2026
139afea
fix(cognitoidentity): wire ctx through remaining callers and fix pers…
Jun 12, 2026
102ced4
feat(databrew): complete region isolation for all operations (go-yend)
Jun 12, 2026
fb15883
WIP: checkpoint (auto)
Jun 12, 2026
5f0a387
feat(route53resolver): context-based region isolation (go-kv5m)
Jun 12, 2026
b3642d1
Merge region-isolation go-kf6u@mq9nx4k0 into mega PR
Jun 12, 2026
aa4ca04
Merge region-isolation go-drfr@mq9nxr0x into mega PR
Jun 12, 2026
cd7b912
Merge region-isolation go-yxit@mq9nyhi6 into mega PR
Jun 12, 2026
129dae5
Merge region-isolation go-yend@mq9nz4iv into mega PR
Jun 12, 2026
0eb98e2
Merge region-isolate route53resolver (go-kv5m)
Jun 12, 2026
edfc19d
feat(resourcegroupstaggingapi): context-based region isolation (go-tfj9)
Jun 12, 2026
ddaffc8
Merge region-isolate resourcegroupstaggingapi (go-tfj9)
Jun 12, 2026
30cce9b
feat(elasticbeanstalk): context-based region isolation (go-y7hz)
Jun 12, 2026
215594d
Merge region-isolate elasticbeanstalk (go-y7hz)
Jun 12, 2026
826a5ab
WIP: checkpoint (auto)
Jun 12, 2026
41120ef
WIP: checkpoint (auto)
Jun 12, 2026
0742827
WIP: checkpoint (auto)
Jun 12, 2026
387db7a
feat(pipes): context-based region isolation (go-yr7s)
Jun 12, 2026
77e5003
feat(timestreamquery): context-based region isolation (go-ni1e)
Jun 12, 2026
618c2de
feat(kinesisanalyticsv2): context-based region isolation (go-de2u)
Jun 12, 2026
01c1016
Merge region-isolate go-yr7s@mqahqtzq into mega PR
Jun 12, 2026
f2dad8c
Merge region-isolate go-ni1e@mqahwe25 into mega PR
Jun 12, 2026
58f0681
WIP: checkpoint (auto)
Jun 12, 2026
02e2787
WIP: checkpoint (auto)
Jun 12, 2026
3153219
feat(kinesisanalytics): context-based region isolation (go-wlgo)
Jun 12, 2026
f7c9216
Merge region-isolate kinesisanalytics (go-wlgo)
Jun 12, 2026
4a81121
WIP: checkpoint (auto)
Jun 12, 2026
7965f4b
WIP: checkpoint (auto)
Jun 12, 2026
3776c14
WIP: checkpoint (auto)
Jun 12, 2026
95deb4c
WIP: checkpoint (auto)
Jun 12, 2026
368ef57
WIP: checkpoint (auto)
Jun 12, 2026
8623582
WIP: checkpoint (auto)
Jun 12, 2026
5468584
feat(medialive): implement Multiplex + MultiplexProgram ops (go-iobx)
Jun 10, 2026
7a4d0c7
Merge region-isolate sagemaker (go-wthd)
Jun 12, 2026
85c873a
feat(wafv2): context-based region isolation (go-xszr)
Jun 12, 2026
6c08cb2
Merge region-isolate wafv2 (go-xszr)
Jun 12, 2026
6660c44
WIP: checkpoint (auto)
Jun 12, 2026
4e3dfbc
parity: region isolation for secretsmanager, acm, acmpca, scheduler, …
Jun 11, 2026
e80292d
parity: region-isolation tests for glacier + sqs (Batch 2 partial)
Jun 11, 2026
f8f9f8c
parity: context-based region isolation for dms
Jun 11, 2026
14b12b1
parity: context-based region isolation for efs
Jun 11, 2026
4736384
parity(batch): context-based region isolation
Jun 11, 2026
679e59a
feat(redshiftdata): context-based region isolation (go-rdqu)
Jun 12, 2026
c4da706
parity(kinesis): context-based region isolation
Jun 11, 2026
2aea813
test: pass ctx to region-isolated backend calls in e2e tests
Jun 11, 2026
1f8d495
feat(mwaa): context-based region isolation
Jun 11, 2026
d7e8813
feat(elb): context-based region isolation for Classic ELB
Jun 11, 2026
458c3d5
parity(neptune): context-based region isolation
Jun 11, 2026
8ba7730
feat(kafka): context-based region isolation for MSK
Jun 11, 2026
39225d2
feat(elasticsearch): context-based region isolation
Jun 11, 2026
3c5d130
feat(emr): context-based region isolation
Jun 11, 2026
7a61fbd
feat(directoryservice): context-based region isolation
Jun 11, 2026
8f09e62
feat(codepipeline): context-based region isolation
Jun 11, 2026
eb9df6d
fix(cfn): pass ctx to region-isolated secretsmanager calls (post-merge)
Jun 11, 2026
1ddf59c
feat(resourcegroups): context-based region isolation
Jun 11, 2026
a4159b1
WIP: checkpoint (auto)
Jun 11, 2026
0a0c629
WIP: checkpoint (auto)
Jun 11, 2026
97d531c
feat(textract): context-based region isolation (go-07ui)
Jun 11, 2026
1f093e8
WIP: checkpoint (auto)
Jun 11, 2026
986885b
feat(identitystore): context-based region isolation
Jun 11, 2026
966cfbf
feat(mediastoredata): context-based region isolation
Jun 11, 2026
8cc2c9b
WIP: checkpoint (auto)
Jun 11, 2026
860a95b
WIP: checkpoint (auto)
Jun 11, 2026
3ac6f56
feat(rolesanywhere): context-based region isolation (go-e450)
Jun 11, 2026
6ed32f1
WIP: checkpoint (auto)
Jun 11, 2026
daf827e
WIP: checkpoint (auto)
Jun 11, 2026
d8b8c78
WIP: checkpoint (auto)
Jun 12, 2026
29fb926
fix(codeconnections): add isolation_test.go, fix ctx in test callers …
Jun 12, 2026
b4c3e71
WIP: checkpoint (auto)
Jun 11, 2026
076ee68
WIP: checkpoint (auto)
Jun 11, 2026
c4166ff
WIP: checkpoint (auto)
Jun 12, 2026
6085597
feat(codestarconnections): context-based region isolation (go-drfr)
Jun 12, 2026
8982b35
WIP: checkpoint (auto)
Jun 11, 2026
6c3cf89
WIP: checkpoint (auto)
Jun 11, 2026
4d4f584
WIP: checkpoint (auto)
Jun 12, 2026
6b27ca8
fix(cognitoidentity): wire ctx through remaining callers and fix pers…
Jun 12, 2026
9b682bb
WIP: checkpoint (auto)
Jun 11, 2026
63ab47d
WIP: checkpoint (auto)
Jun 11, 2026
e7a87df
WIP: checkpoint (auto)
Jun 12, 2026
df55f2a
feat(databrew): complete region isolation for all operations (go-yend)
Jun 12, 2026
c321605
feat(route53resolver): context-based region isolation (go-kv5m)
Jun 12, 2026
edb47df
WIP: checkpoint (auto)
Jun 12, 2026
26e9209
feat(resourcegroupstaggingapi): context-based region isolation (go-tfj9)
Jun 12, 2026
5aa3d83
feat(elasticbeanstalk): context-based region isolation (go-y7hz)
Jun 12, 2026
c6bced2
WIP: checkpoint (auto)
Jun 12, 2026
f5cb447
feat(kinesisanalyticsv2): context-based region isolation (go-de2u)
Jun 12, 2026
0ea415d
feat(pipes): context-based region isolation (go-yr7s)
Jun 12, 2026
272d1d1
feat(timestreamquery): context-based region isolation (go-ni1e)
Jun 12, 2026
7b7eeff
WIP: checkpoint (auto)
Jun 12, 2026
a0c6e1a
WIP: checkpoint (auto)
Jun 12, 2026
1df3a37
feat(kinesisanalytics): context-based region isolation (go-wlgo)
Jun 12, 2026
792c1b3
WIP: checkpoint (auto)
Jun 12, 2026
bf56fe8
WIP: checkpoint (auto)
Jun 12, 2026
7017fa7
WIP: checkpoint (auto)
Jun 12, 2026
a821264
WIP: checkpoint (auto)
Jun 12, 2026
d0ecb54
WIP: checkpoint (auto)
Jun 12, 2026
6be68d8
feat(medialive): implement Multiplex + MultiplexProgram ops (go-iobx)
Jun 10, 2026
789b059
WIP: checkpoint (auto)
Jun 12, 2026
f67a402
WIP: checkpoint (auto)
Jun 12, 2026
afdf99f
WIP: checkpoint (auto)
Jun 12, 2026
5815288
feat(wafv2): context-based region isolation (go-xszr)
Jun 12, 2026
12aa72c
WIP: checkpoint (auto)
Jun 12, 2026
1ec7cf2
WIP: checkpoint (auto)
Jun 12, 2026
afd69a3
WIP: checkpoint (auto)
Jun 12, 2026
6e5de2b
Merge region-isolate rdsdata (go-w2ob)
Jun 12, 2026
e4dcc2f
WIP: checkpoint (auto)
Jun 12, 2026
66f18b4
Merge region-isolate dynamodbstreams (go-bypu)
Jun 12, 2026
e10ddd0
WIP: checkpoint (auto)
Jun 12, 2026
432494a
WIP: checkpoint (auto)
Jun 12, 2026
ffeac8d
WIP: checkpoint (auto)
Jun 12, 2026
3dd31fe
WIP: checkpoint (auto)
Jun 12, 2026
422d11d
Region-isolate services/docdb (go-nstc)
Jun 12, 2026
351623b
WIP: checkpoint (auto)
Jun 12, 2026
dd832bf
WIP: checkpoint (auto)
Jun 12, 2026
7fb7c0e
WIP: checkpoint (auto)
Jun 12, 2026
c6cf098
WIP: checkpoint (auto)
Jun 12, 2026
d658910
feat(elasticache): context-based region isolation (go-ll28)
Jun 12, 2026
701e9fa
Merge region-isolate elasticache (go-ll28)
Jun 12, 2026
33ba573
WIP: checkpoint (auto)
Jun 12, 2026
a995b3a
Merge region-isolate memorydb (go-o46d)
Jun 12, 2026
791f83a
WIP: checkpoint (auto)
Jun 12, 2026
387d85c
WIP: checkpoint (auto)
Jun 12, 2026
cc26563
WIP: checkpoint (auto)
Jun 12, 2026
43168c1
fix: resolve lint errors and formatting across codebase
Jun 12, 2026
8550a24
fix(memorydb): align handler param order to (ctx, c) — fixes mega-v2 …
Jun 12, 2026
d592627
fix(ci): resolve funlen lint + unit test failures for PR #2227
Jun 13, 2026
84be643
WIP: checkpoint (auto)
Jun 13, 2026
b6d66be
WIP: checkpoint (auto)
Jun 13, 2026
be11593
WIP: checkpoint (auto)
Jun 13, 2026
4276c12
feat(bedrockagent): implement full AWS Bedrock Agent service parity (…
Jun 13, 2026
fd0fad0
WIP: checkpoint (auto)
Jun 13, 2026
83d3bb1
WIP: checkpoint (auto)
Jun 13, 2026
5d69714
feat(cleanrooms): implement full AWS Clean Rooms service (go-ca7c)
Jun 13, 2026
4c75a27
WIP: checkpoint (auto)
Jun 13, 2026
abdce3f
WIP: checkpoint (auto)
Jun 13, 2026
c4ff050
WIP: checkpoint (auto)
Jun 13, 2026
6982f29
WIP: checkpoint (auto)
Jun 13, 2026
65d762d
WIP: checkpoint (auto)
Jun 13, 2026
88351f4
fix(pipes,cloudformation): resolve committed merge conflict markers
Jun 13, 2026
9adc1b0
WIP: checkpoint (auto)
Jun 13, 2026
f00c5b0
WIP: checkpoint (auto)
Jun 13, 2026
207c5bb
WIP: checkpoint (auto)
Jun 13, 2026
a70bb17
WIP: checkpoint (auto)
Jun 13, 2026
842980e
refactor(cleanrooms): fix lint violations in handler.go (go-qbat)
Jun 13, 2026
ba6fbb9
WIP: checkpoint (auto)
Jun 13, 2026
c8e0a94
fix(cleanrooms): add missing aws-sdk-go-v2/service/cleanrooms require
Jun 13, 2026
b96c872
test(fis): quarantine flaky TagResource_NotFound (go-9b08)
Jun 13, 2026
448c8ba
Merge remote-tracking branch 'origin/main' into HEAD
Jun 13, 2026
b5709cd
Merge remote-tracking branch 'origin/polecat/amber/go-ca7c@mqbpzmle' …
Jun 13, 2026
aae16ba
Merge remote-tracking branch 'origin/polecat/jasper/go-ogv5@mqc4mwkv'…
Jun 13, 2026
63187c7
Merge remote-tracking branch 'origin/fix/quarantine-fis-tagresource-f…
Jun 13, 2026
3eaad04
fix(bench): pass context to CreateSecret/GetSecretValue after merge
Jun 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ linters:
# therefore run sequentially, so paralleltest is not applicable here.
- path: 'dax/dataplane_integration_test.go'
linters: [ paralleltest ]
# isolation_test.go uses unexported types and must be in the same package.
- path: 'elasticache/isolation_test.go'
linters: [ testpackage, paralleltest ]
- text: 'should have a package comment'
linters: [ revive ]
- text: 'exported \S+ \S+ should have comment( \(or a comment on this block\))? or be unexported'
Expand Down
106 changes: 106 additions & 0 deletions MULTI_ACCOUNT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Multi-Account / Multi-Region Isolation

This document describes gopherstack's current account/region model, why full
multi-account / multi-region isolation is **not yet implemented**, what a faithful
implementation would require, and a migration path. It is a design note, not an
implemented feature.

## Current model: single account, single region

gopherstack runs as a single-tenant simulator with one fixed account ID and one
default region:

- The account ID comes from `--account-id` / `ACCOUNT_ID` (default
`000000000000`) and the region from `--region` / `REGION` / `AWS_REGION` /
`AWS_DEFAULT_REGION` (default `us-east-1`). Both are surfaced through
`pkgs/config/config.go` (`GlobalConfig.GetAccountID`, `GetRegion`).
- Every service backend keys its in-memory state **only by resource name/ID**
(e.g. an SQS queue is keyed by queue name, a DynamoDB table by table name). The
account ID and region embedded in a request are read for two narrow purposes
only:
- **routing** — `httputils.ExtractRegionFromRequest` / `ExtractServiceFromRequest`
parse the SigV4 `Authorization` credential scope to pick the target service;
- **ARN construction** — backends stamp the configured account/region into the
ARNs they return.
- A handful of services thread a per-request region through to a
region-partitioned store (e.g. Firehose's `regionStore(region)`), but this is
not consistent across services and there is **no account dimension** anywhere.

Practical consequence: two clients pointed at different account IDs or regions
share the same underlying state. `arn:aws:sqs:us-east-1:111111111111:q` and
`arn:aws:sqs:eu-west-1:222222222222:q` resolve to the *same* queue if the name
matches. This matches LocalStack's open-tier default historically, but diverges
from real AWS and from LocalStack's account/region-keyed stores.

## What full isolation would require

Real AWS partitions every resource by **(partition, account, region)**. A
faithful implementation in gopherstack would need all of the following:

1. **Request-scoped account+region resolution.** A single middleware that derives
`(accountID, region)` for every request — from the SigV4 credential scope, the
`X-Amz-*` headers, the host/SNI, or an explicit override — and places it on the
`context.Context`. Today only region is partially derived and only for routing.

2. **Account+region-keyed backends.** Every service's in-memory maps would change
from `map[name]*Resource` to `map[accountID]map[region]map[name]*Resource`
(or an equivalent composite key). This touches **every** backend in
`services/*` — dozens of stores — plus their persistence snapshots, janitors,
TTL sweepers, and reset logic.

3. **Cross-service wiring must carry the scope.** Every event/integration path
(S3→SQS/SNS/Lambda, SNS→*, EventBridge→*, CloudWatch Logs subscription filters,
Step Functions, Pipes, Scheduler, ESM pollers) currently passes resource
names/ARNs. Each would need to resolve and propagate the source resource's
`(account, region)` so the target lookup happens in the correct partition. ARNs
already encode account+region, so target resolution can key off the ARN — but
the source-side context and any name-only lookups must be made scope-aware.

4. **ARN parsing as the source of truth.** Where a target is given by ARN, the
account/region must be read from the ARN rather than the global config. Where a
target is given by bare name (many APIs), the *caller's* request scope must be
used.

5. **Persistence format change.** Snapshot files would need to encode the
account/region dimension so restored state lands in the right partition; this
is a breaking change to the on-disk format and requires a migration/versioning
step in `pkgs/persistence`.

6. **DNS, dashboard, health/reset.** Embedded DNS hostname synthesis, the
dashboard's resource views, and `POST /_gopherstack/reset[?service=…]` would all
need an account/region filter to remain coherent.

## Why it is deferred

This is a cross-cutting re-architecture of the state-keying scheme in every
service, the persistence format, and every cross-service wiring path. It is high
risk (touches all stored state and all delivery paths at once), cannot be staged
safely inside an unrelated stacked PR, and would regress existing single-account
clients unless gated. It is intentionally **out of scope** here and tracked as a
standalone effort.

## Migration path (incremental, low-risk)

1. **Introduce request scope (no behavior change).** Add an
`(accountID, region)` value to the request `context.Context` via middleware,
defaulting to the global config when absent. Backends ignore it at first.

2. **Add a keying abstraction.** Introduce a `scopeKey{account, region}` helper
and a generic partitioned-store wrapper. Backends opt in one at a time,
defaulting all reads/writes to the single global scope so behavior is
identical until a backend is migrated.

3. **Migrate backends incrementally**, highest-value first (DynamoDB, S3, SQS,
SNS, Lambda), each behind the default-global-scope shim, with per-service tests
asserting isolation between two scopes.

4. **Make wiring scope-aware** alongside each migrated service: ARN-targeted
deliveries resolve scope from the ARN; name-targeted deliveries inherit the
source request scope.

5. **Version the persistence format** to carry the scope dimension, with a
loader that maps legacy (scopeless) snapshots into the default global scope.

6. **Flip the default** only once every backend and wiring path is scope-aware,
optionally behind a `--isolate-accounts` flag for one release to allow
rollback.
6 changes: 3 additions & 3 deletions bench/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func BenchmarkSecretsManager_CreateSecret(b *testing.B) {
b.ReportAllocs()

for i := range b.N {
_, err := backend.CreateSecret(&secretsmanager.CreateSecretInput{
_, err := backend.CreateSecret(b.Context(), &secretsmanager.CreateSecretInput{
Name: fmt.Sprintf("bench-secret-%d", i),
SecretString: `{"key":"value"}`,
})
Expand All @@ -296,7 +296,7 @@ func BenchmarkSecretsManager_CreateSecret(b *testing.B) {

func BenchmarkSecretsManager_GetSecretValue(b *testing.B) {
backend := secretsmanager.NewInMemoryBackend()
_, setupErr := backend.CreateSecret(&secretsmanager.CreateSecretInput{
_, setupErr := backend.CreateSecret(b.Context(), &secretsmanager.CreateSecretInput{
Name: "bench-secret",
SecretString: `{"key":"value"}`,
})
Expand All @@ -306,7 +306,7 @@ func BenchmarkSecretsManager_GetSecretValue(b *testing.B) {
b.ReportAllocs()

for range b.N {
_, err := backend.GetSecretValue(&secretsmanager.GetSecretValueInput{
_, err := backend.GetSecretValue(b.Context(), &secretsmanager.GetSecretValueInput{
SecretID: "bench-secret",
})
require.NoError(b, err)
Expand Down
28 changes: 0 additions & 28 deletions check_cfn_wiring.py

This file was deleted.

Loading
Loading