Imported from eshu-hq/eshu (
go/internal/collector/awscloud/services/datazone/awssdk/AGENTS.md). Install upstream withnpx skills add eshu-hq/eshu --skill awssdk. Copyright stays with the author.
AGENTS.md - internal/collector/awscloud/services/datazone/awssdk guidance
Read First
README.md- package purpose, telemetry, and invariants.client.go- theapiClientread interface, Snapshot orchestration, tag reads, and telemetry.mapper.go- domain/project/environment pagination and safe metadata mapping.datasource.go- data source pagination plus GetDataSource backing-store extraction.exclusion_test.go- the build-time gate that fails if a content-read or mutation method reaches the adapter interface.../scanner.go- scanner-owned DataZone fact selection.../README.md- DataZone scanner contract.../../../README.md- AWS cloud envelope contract.docs/public/services/collector-aws-cloud-scanners.md- AWS collector service coverage and runtime requirements.
Invariants
- Keep DataZone SDK calls here, not in
cmd/collector-aws-cloudor the scanner package. - Keep the
apiClientinterface limited toList*reads plus the two allowed describe readsGetDomainandGetDataSource. The exclusion test fails the build if any method matches a content/mutation name or is aGetoutside the allowed set; do not loosen it. - Wrap each AWS paginator page or point read in
recordAPICall. - Keep metric labels bounded to service, account, region, operation, and result.
- Persist only safe domain/project/environment/data-source metadata plus resource tags and the resolvable backing-store names. Never read or persist glossary, glossary-term, asset, listing, subscription, time-series, lineage, relational filter expression, or access credential content.
- From
GetDataSource, copy only the parent project id and the backing-store names; never the relational filter expressions or credentials. - Do not copy Redshift Serverless workgroup names into an edge: the published workgroup ARN is not synthesizable from the name, so skip rather than dangle.
- Do not cache AWS credentials or SDK clients beyond the claim-scoped runtime object that created this adapter.
Common Changes
- Add a new DataZone metadata read by extending
Clientand theapiClientinterface with anotherList*read, writing a scanner or adapter test first, then mapping the SDK response into scanner-owned types. The exclusion test rejects any non-Listaddition outside the allowed describe set. - Add a new throttle code in
isThrottleErroronly after AWS or Smithy evidence shows the code is retry/throttle-shaped. - Extend resource mapping only for AWS source data that is metadata and does not reveal governed content.
What Not To Change Without An ADR
- Do not read glossaries, glossary terms, assets, asset content, listings, subscriptions, time-series data, or lineage, and do not call any DataZone mutation API.
- Do not widen the allowed
Getdescribe set beyondGetDomainandGetDataSourcewithout proving the new read carries no governed content. - Do not infer workload, environment, deployment, or ownership truth from DataZone names or tags.
- Do not write facts, graph rows, workflow rows, or reducer-owned state here.