Skip to content

AWS Config: no plugin exists, so recorder, delivery channel, and conformance packs are unreachable #580

Closed

Description

@scttfrdmn

There is no config_plugin.go and no configservice namespace — emulator/config.go is substrate's own configuration, unrelated. So the whole AWS Config service is absent, and any request to it fails at routing.

AWS Config is where detective controls live. A tool that establishes a compliance baseline in an account does roughly half its work through SCPs (preventive) and half through Config (detective), and today only the first half can be emulated at all — and even that is blocked on Organizations (#578).

Operations, by cluster

Recorder — whether the account is recording at all. Everything else is decoration if this is off, which makes it the first thing a baseline ensures and the first thing an audit checks.

  • PutConfigurationRecorder
  • DescribeConfigurationRecorders
  • DescribeConfigurationRecorderStatus
  • StartConfigurationRecorder
  • StopConfigurationRecorder

Delivery channel — where snapshots and history go.

  • PutDeliveryChannel
  • DescribeDeliveryChannels
  • DescribeDeliveryChannelStatus

Conformance packs — the unit an entire control set is deployed as.

  • PutConformancePack
  • DescribeConformancePacks
  • DescribeConformancePackStatus
  • DescribeConformancePackCompliance
  • GetConformancePackComplianceSummary
  • DeleteConformancePack

Rules and compliance — needed if compliance state is to be observable rather than merely configured.

  • PutConfigRule
  • DescribeConfigRules
  • DescribeComplianceByConfigRule
  • GetComplianceDetailsByConfigRule

Behaviours worth modelling

1. Two distinct states, both of which look like "on". A recorder can exist and be stopped. DescribeConfigurationRecorders returning a recorder says nothing about whether it is recording — that is DescribeConfigurationRecorderStatus.recording. A caller that checks only the first concludes the account is covered when it is recording nothing, and this is the single most valuable thing here to be able to test.

2. PutConfigurationRecorder and PutDeliveryChannel are genuinely idempotent — unusually for AWS, they overwrite rather than refuse. Worth having because it is the opposite of the Organizations pattern in #578, and a caller that assumes uniformity across services gets one of the two wrong.

3. The recorder needs a service-linked or explicit IAM role, and it validates. PutConfigurationRecorder with an unassumable role fails. This is a real ordering constraint: the role has to exist and be assumable by Config before the recorder can be created, and a plugin that accepts any ARN lets a baseline pass that would fail on a real account.

4. A delivery channel needs a reachable S3 bucket with a policy that permits Config to write. The interesting failure is InsufficientDeliveryPolicyException — a bucket that exists but whose policy does not admit the service. Substrate has S3, so the cross-service check is possible in a way it would not be in a hand-rolled fake, which is the sort of thing an emulator is uniquely good at.

5. Conformance pack deployment is asynchronous with a status. CREATE_IN_PROGRESS → CREATE_COMPLETE or CREATE_FAILED, and the failure carries a reason. Same shape as CreateAccount in #578: a plugin that completes inline lets a missing poll loop pass.

6. Compliance evaluation results should be seedable rather than computed. Substrate should not have to evaluate real Config rules against real resource state — but a caller that reads compliance to produce an evidence artifact needs to be able to test the NON_COMPLIANT and INSUFFICIENT_DATA paths, and INSUFFICIENT_DATA especially, since it is the state a freshly created pack sits in and is easy to mistake for compliant.

7. Config is regional, and a multi-region baseline is the normal case. Whatever substrate's existing regional-state story is, this service exercises it: a recorder is per-region, and "recording in one region only" is a common real misconfiguration.

Context

automat needs the recorder, delivery channel, and conformance pack clusters for the in-child half of its work; the rules/compliance cluster matters for the evidence artifacts it emits. Lower priority than #578 and #579 for our purposes, since Organizations blocks earlier.

Filed as one issue because the clusters share a plugin; splitting recorder + delivery channel from conformance packs would be a reasonable first slice, and would already be useful on its own.

Activity

  1. added
    type: feature
    priority: medium
    on Aug 5, 2026
  2. added this to the v0.101.0 milestone on Aug 14, 2026
  3. scttfrdmn commented on Aug 14, 2026

    @scttfrdmn
    OwnerAuthor

    Moving to v0.101.0 ("detective controls"), taken whole — all 18 operations in one
    release rather than split. v0.100.0 is IAM-only (#579 plus the group and policy-fidelity
    work it depends on), so Config gets its own milestone rather than riding along with a
    theme it does not share.

    Compliance state is seed-only, never computed

    The main design decision to record now, because it shapes every rule operation in the
    issue. Substrate will not evaluate a Config rule against recorded resource state to
    derive COMPLIANT/NON_COMPLIANT. Compliance is a seedable value read from a
    control-plane endpoint at request time.

    This follows CLAUDE.md's scope boundary directly. Evaluating a rule is the workload behind
    the API — it is what the Config rule engine does, not something observable through a
    Config API call. What a caller observes is the evaluation result, and results are
    precisely what the seed pattern exists to supply. Computing them would also require
    substrate to implement AWS-managed rule logic (there are hundreds), and would make the
    answer depend on how completely substrate's other plugins happen to model a resource —
    i.e. a consumer's compliance test would silently change meaning as unrelated plugins gain
    fidelity. Seeding keeps a red test a real signal.

    So: PutEvaluations records what a caller submits (that is a custom rule reporting its own
    result, which is genuinely an API observation), and GetComplianceDetailsByConfigRule /
    DescribeComplianceByConfigRule / DescribeComplianceByResource read seeded values,
    defaulting to the nominal path. Endpoint shape follows the established convention —
    POST/DELETE /v1/config/..., keyed by rule name or resource ID with a "*" wildcard,
    same as Bedrock job status and SageMaker training-job status.

    Two ordering refusals the issue omits

    Both are documented Config behaviour and are the errors a consumer's setup code actually
    trips over:

    • NoAvailableDeliveryChannelException — StartConfigurationRecorder fails if no delivery
      channel exists. A tool that creates a recorder and starts it without a channel must see
      this, not success.
    • NoAvailableConfigurationRecorderException — PutDeliveryChannel fails if no
      configuration recorder exists.

    They pin the setup ordering, which is the part of Config a consumer gets wrong first. Both
    will be verified against the AWS API reference before implementation, along with every
    other request/response shape and error code, per CLAUDE.md.

  4. scttfrdmn commented on Aug 15, 2026

    @scttfrdmn
    OwnerAuthor

    Planning for v0.101.0 is complete. Five things to record before code — one of them is a correction to this issue, one is a hard prerequisite it does not mention, and one is a pre-existing defect that becomes fixable here.

    1. Behaviour #3 is wrong: InvalidRoleException is a null/empty check, not an assumability check

    The issue says "PutConfigurationRecorder with an unassumable role fails" and that "a plugin that accepts any ARN lets a baseline pass that would fail on a real account". The reference does not support that. InvalidRoleException is documented as:

    You have provided a null or empty Amazon Resource Name (ARN) for the IAM role assumed by AWS Config and used by the customer managed configuration recorder.

    That is a presence check on the field, not a verification that the role exists or that config.amazonaws.com can assume it. Substrate will implement the documented check and will not attempt to resolve the role in IAM — doing so would refuse requests AWS accepts, which is the worse failure. (Same shape as the "there is no 25-action cap" correction on #579.)

    Worth keeping from the same page, because the model disagrees with the service: roleARN is not marked required in the API model, but the reference says "While the API model does not require this field, the server will reject a request without a defined roleARN." So the field is effectively required, and that goes in the release's ## Provenance.

    2. Hard prerequisite: Config's target prefix is not routable

    Config's targetPrefix is StarlingDoveService, and starlingdoveservice is absent from targetServiceAliases (emulator/parser.go:219-316). extractServiceFromTarget strips a leading Amazon, truncates at the first _, lowercases, and consults that map — so StarlingDoveService reduces to starlingdoveservice and matches nothing.

    Without the alias the plugin would be registered, unit-tested green, and unreachable from every SDK. That is the #561 (SSO) / #610 / #636 class, and the cautionary comments about it are already written into that map. The alias ships in the first PR alongside the recorder cluster, never on its own, and the routing test asserts all three resolution paths (target prefix, host, SigV4 signing name).

    3. AWS::Config::ConfigRule and AWS::Config::ConfigurationRecorder are already CloudFormation stubs that create nothing

    emulator/cfn_resources_v32.go:173-212 holds deployConfigConfigRule and deployConfigConfigurationRecorder. Both call d.stubStore(...), synthesize an ARN, and never dispatch an API call — so a template containing either reports CREATE_COMPLETE having created nothing, and no observable contradicts it. That is the #388 class, and it is only fixable once these handlers exist, so it is in scope here.

    The stub's recorder ARN is also wrong. It emits arn:aws:config:{region}:{account}:recorder/{name}; the Service Authorization Reference gives config-recorder/${Name}. The full set substrate will mint, all from that reference (the API reference does not give ARN formats):

    • config-recorder/${Name}
    • delivery-channel/${Name}
    • config-rule/${ConfigRuleId}
    • conformance-pack/${Name}/${Id}

    AWS::Config::DeliveryChannel and AWS::Config::ConformancePack stay unsupported in CloudFormation rather than becoming new stubs — a stub is the defect this removes.

    4. Scope is 25 operations: the 18 above, plus the deletes, the tag trio, and PutEvaluations

    Additions to what the issue lists:

    • DeleteConfigurationRecorder, DeleteDeliveryChannel, DeleteConfigRule (DeleteConformancePack is already listed). These are not padding — they carry ordering refusals the issue's operations cannot express. DeleteDeliveryChannel answers LastDeliveryChannelDeleteFailedException ("You cannot delete the delivery channel you specified because the customer managed configuration recorder is running") while the recorder runs, and DeleteConformancePack meets ResourceInUseException mid-transition. Without the deletes, a teardown-and-rebuild fixture — which is what a test run repeated twice is — cannot be written at all.
    • TagResource, UntagResource, ListTagsForResource. Tags are set at creation by every Put and, per the reference, not updated by a later Put — so without the tag operations a tag can be written once and never changed. buildResourceARN (authz.go:466) also gains a Config case, without which a policy scoped to one rule would apply to every one.
    • PutEvaluations, which is the one compliance write that belongs here under CLAUDE.md's scope boundary — see below.

    5. Re-affirming what is already recorded here

    Compliance is seed-only, never computed (behaviour #6). Evaluating a rule against resource state is workload-internal, not an API observation, so compliance is a seedable value read from a control-plane endpoint at request time. The default with no seed is INSUFFICIENT_DATA, not a fabricated COMPLIANT — which is also the state behaviour #6 specifically names as easy to mistake for compliant.

    PutEvaluations is the exception that proves the rule: a custom rule reporting its own result is an API observation, so what a caller submits is recorded, and recorded evaluations are reported in preference to the seed.

    The two ordering refusals this issue omits are both verified verbatim in the model and the reference:

    • NoAvailableDeliveryChannelException — StartConfigurationRecorder: "You must have created a delivery channel to successfully start the customer managed configuration recorder."
    • NoAvailableConfigurationRecorderException — guards both PutDeliveryChannel and PutConfigRule: "Use the PutConfigurationRecorder operation to create the customer managed configuration recorder."

    Together with behaviour #1 (a recorder that exists but is stopped) and the deletes above, that makes a consumer's ordering bug observable rather than silently tolerated, which is the substance of this issue.

    Behaviour #4's InsufficientDeliveryPolicyException is computed from real S3 state — bucket: and bucket_policy: in s3Namespace — with a deliberately permissive matcher: no bucket is NoSuchBucketException, no policy at all is the refusal, and any Allow statement plausibly admitting config.amazonaws.com to a s3:PutObject-shaped action passes. A seed can force or suppress it for a consumer with no S3 fixture. Demanding the exact AWS policy would refuse policies AWS accepts, and a wrong refusal breaks working code.

  5. added 3 commits that reference this issue on Aug 15, 2026
    e478ee5
    3aa1048
    7438a3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumtype: feature

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions