Skip to content

feat(#1613, #1539, #1627): Kinesis ListShards, EFO consumers, retention and UpdateMaxRecordSize; Organizations create/delete - #1704

Merged
scttfrdmn merged 4 commits into
mainfrom
feat/v0134-kinesis-orgs
Nov 24, 2026
Merged

scttfrdmn merged 4 commits into
mainfrom
feat/v0134-kinesis-orgs

Conversation

@scttfrdmn

@scttfrdmn scttfrdmn commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Fixes #1539
Fixes #1627
Part of #1613 — this PR ships the Kinesis items: ListShards, EFO consumers and the retention changes. Still open under #1613: Route 53, STS/IAM federation, Lambda versions, EventBridge, CloudWatch/Logs and S3, which have their own v0.134.0 PRs. SubscribeToShard is refused here and tracked in #1695.

  • Kinesis ListShards.
    • Lists the DescribeStream shard view, ordered by shard ID.
    • Pages on MaxResults (1–10000; default and cap 1000) and on NextToken, using page[T]/jsonNextToken. The token itself carries the stream and the filter.
    • Supports ExclusiveStartShardId and every ShardFilter type; shard times come from the sequence numbers on the simulated clock.
    • StreamCreationTimestamp is accepted; a value other than the stream's creation time is ResourceNotFoundException.
    • NextToken together with StreamName, ExclusiveStartShardId or StreamCreationTimestamp is InvalidArgumentException.
    • Accepts StreamARN as well as StreamName.
  • Kinesis EFO consumers.
    • Register/Describe/List/DeregisterStreamConsumer. The ARN is streamARN/consumer/{name}:{epoch seconds} on the simulated clock.
    • Limits: 20 per stream and five CREATING at once (LimitExceededException). A duplicate name is ResourceInUseException.
    • CREATING→ACTIVE follows the progression.go seed POST/DELETE /v1/kinesis/consumer-status, mounted in the recorded control-plane group.
    • DeleteStream honours EnforceConsumerDeletion.
  • Kinesis tags by ARN. TagResource, UntagResource and ListTagsForResource cover streams and consumers. The page names consumers, and RegisterStreamConsumer accepts Tags.
  • Kinesis retention. Increase/DecreaseStreamRetentionPeriod, 24–8760 hours. The value must move the period in the operation's direction, and the stream must be ACTIVE.
  • Kinesis UpdateMaxRecordSize (kinesis: UpdateMaxRecordSize is not routed #1539). A value out of range is ValidationException, citing the API page's own sentence; CreateStream keeps InvalidArgumentException. The decision is recorded on the issue.
  • Kinesis SubscribeToShard answers UnknownOperationException/404 with substrate's own message pointing at kinesis: SubscribeToShard (HTTP/2 event stream) #1695, the same shape as the OpenSearch control-plane refusal. It is not in the dispatch switch, so the catalog does not count it as routed.
  • Kinesis describes now report EncryptionType: NONE, and the summary reports ConsumerCount. Without EncryptionType, aws_kinesis_stream plans a change on every refresh.
  • CloudFormation. AWS::Kinesis::StreamConsumer has a cfnResourceDeployers row, a deleter (DeregisterStreamConsumer) and GetAtt metadata, so StreamARN resolves to the stream's ARN rather than the consumer's.
  • Organizations (Organizations: route CreateOrganization and DeleteOrganization #1627).
    • CreateOrganization (ALL/CONSOLIDATED_BILLING) answers AlreadyInOrganizationException when the caller already has an organization or is a member of one.
    • DeleteOrganization refuses an organization that still has members (OrganizationNotEmptyException) and refuses a member caller (AccessDeniedException). Otherwise it sweeps every record the organization holds.
    • A per-account org_deleted: marker, read by both ensureOrganization and HandleRequest, makes every call answer AWSOrganizationsNotInUseException until the next CreateOrganization.
    • Auto-create stays for accounts that have never had an organization, and IDs come from the request mint.
    • An explicit create enables no policy type. This follows the Terraform provider's testAccOrganization_basic, which runs against AWS, and is recorded under Provenance.
    • Terraform also reads ListAWSServiceAccessForOrganization, so it is routed along with Enable/DisableAWSServiceAccess.
  • Catalog. Routed operations go from 1,128 to 1,144 (unchanged by the review fixes): Kinesis +11, Organizations +5, and the Organizations count moves from 34 to 39.

Review fixes (second commit set):

  • ListShards conflict check: the NextToken conflict check walks the members in a fixed order, so the member a refusal names is deterministic. kinesisValidateTagMap now checks keys in sorted order for the same reason, which fixes this pre-existing nondeterminism in AddTagsToStream and CreateStream as well. There is a test for both.
  • Consumer locking: TagResource/UntagResource hold consumerMu across the load and the save, so a write can no longer resurrect a deregistered consumer. RegisterStreamConsumer now reads the stream under the lock.
  • CloudFormation stream delete: deleting an AWS::Kinesis::Stream sends EnforceConsumerDeletion: true. This is substrate's reading. The AWS::Kinesis::Stream template reference says nothing about consumers, and the resource provider's source isn't public (aws-cloudformation-resource-providers-kinesis returns a 404), so I couldn't confirm what CloudFormation sends. A test covers a consumer registered outside the stack.
  • Service access under CONSOLIDATED_BILLING: all three service-access ops answer ConstraintViolationException/ORGANIZATION_NOT_IN_ALL_FEATURES_MODE. The message is that reason's description in the API reference's ConstraintViolationException. No service-access operation page states the requirement itself. The evidence is the reason's own description and the Terraform provider's observed handling: it skips ListAWSServiceAccessForOrganization unless the feature set is ALL, with an inline comment quoting AWS's "does not have all features enabled" ConstraintViolationException.
  • AvailablePolicyTypes: it now reports the root's policy types, the same set ListRoots reports. The API reference deprecates the member in favour of ListRoots. It is absent after DisablePolicyType and for an explicitly created organization.
  • Nits:
    • ShardFilter timestamps are compared at millisecond precision, which is the precision the token stores and the one API_ShardFilter publishes.
    • The consumer ARN errors are wrapped with %w.
    • The CHANGELOG ### Provenance section and the acceptance-test clause are removed.

Provenance for the release notes: an explicit CreateOrganization leaves the root's policy types empty. This follows the Terraform AWS provider's testAccOrganization_basic (v6.73.0, internal/service/organizations/organization_test.go), which runs against real AWS and asserts roots.0.policy_types.# is 0 after CreateOrganization with FeatureSet ALL. The API reference instead says SCPs are "automatically enabled in the root".

Gates run locally:

  • make lint test e2e
  • Service Reference Drift: operation-catalog-check docs-reference-check docs-headings-check operation-docs-check authz-reference-check cfn-schema-check wire-model-check scheduler-query-model-check doc-links-check
  • Wire Bookkeeping Drift: wire-bookkeeping-check discarded-*-check nondeterminism-check comment-history-check, plus docs-versions and docs-counts-check
  • SUBSTRATE_IAC=1 make iac-e2e
  • VitePress build, after which docs/node_modules was removed
  • make wire-model-fetch && make wire-model for the new ops

Terraform scratch run (provider 6.73.0, against a built server):

  • Resources: aws_kinesis_stream (retention 48), aws_kinesis_stream_consumer and aws_organizations_organization.
  • apply succeeded and the following plan was empty.
  • Retention moved 48→72 (IncreaseStreamRetentionPeriod), then 72→24 (DecreaseStreamRetentionPeriod), with an empty plan after each.
  • destroy succeeded.

Follow-ups: #1695 (SubscribeToShard), already filed.

@scttfrdmn scttfrdmn added this to the v0.134.0 milestone Nov 24, 2026
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

…ock on tag writes, CFN EnforceConsumerDeletion, service access needs all features, AvailablePolicyTypes from the root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Organizations: route CreateOrganization and DeleteOrganization kinesis: UpdateMaxRecordSize is not routed

1 participant