Skip to content

New service emulator — AWS Config (recorder + rules + org rule + aggregator) #996

Description

@b-rajesh

AWS Service name

AWS Config

Operations needed

PutConfigurationRecorder, DescribeConfigurationRecorders, DescribeConfigurationRecorderStatus (added — recorder-status Read), StartConfigurationRecorder, PutDeliveryChannel, DescribeDeliveryChannels (added — aws_config_delivery_channel Read), PutConfigRule, DescribeConfigRules (added — aws_config_config_rule Read), DeleteConfigRule (added — destroy), PutOrganizationConfigRule, DescribeOrganizationConfigRules (added — org-rule Read), PutConfigurationAggregator, DescribeConfigurationAggregators, TagResource / UntagResource / ListTagsForResource (added). Store + list; no rule evaluation.

Use case

Why. A landing-zone governance baseline turns on AWS Config org-wide: start the configuration recorder (PutConfigurationRecorder + StartConfigurationRecorder), point a delivery channel at a central S3 bucket (PutDeliveryChannel), enable managed Config rules (PutConfigRule), roll out an organization Config rule across accounts (PutOrganizationConfigRule), and stand up a configuration aggregator in the Security OU that aggregates all accounts/regions (PutConfigurationAggregator). A user validating that IaC locally needs the Config control-plane to apply and read back — confirm the recorder, delivery channel, rules, org rule, and aggregator exist and are wired — without a real AWS organization.

Out of scope (important for an emulator). Store + list only — no rule evaluation, no compliance results, no configuration snapshots. A simulator can't evaluate resources against rules, and that is explicitly not the goal. This proves the IaC configures Config correctly (recorder running, channel wired, rules + org rule + aggregator created, tags applied), not that compliance is assessed. Config / API-shape / RBAC validation, not behavior.

Pairs with #993 + #989. The organization Config rule and the aggregator are administered from the delegated-admin Security-OU account (#993), which is vended by #989. AWS Config's own ops are independently absent (proof below).

Parity note. Ship each mutation with its paired Read so apply round-trips without drift: PutConfigurationRecorderDescribeConfigurationRecorders/DescribeConfigurationRecorderStatus; PutDeliveryChannelDescribeDeliveryChannels; PutConfigRuleDescribeConfigRules; PutOrganizationConfigRuleDescribeOrganizationConfigRules; PutConfigurationAggregatorDescribeConfigurationAggregators; TagResourceListTagsForResource. StartConfigurationRecorder flips recorder status; DeleteConfigRule for destroy symmetry.

Proof

Verified against a clean MiniStack v1.3.69 (Terraform 1.5.7 + hashicorp/aws ~> 5.0, provider endpoints { config = "http://localhost:4566" }). There is no AWS Config emulator — no config (StarlingDove) handler in the service registry/router — so even though AWS Config is a JSON-RPC service, the unknown X-Amz-Target falls through to the default (S3-style XML) handler and the Config SDK cannot decode the response.

resource "aws_config_configuration_recorder" "this" {
  name     = "default"
  role_arn = "arn:aws:iam::000000000000:role/config-role"
}
Error: putting ConfigService Configuration Recorder (default): operation error Config Service:
PutConfigurationRecorder, https response error StatusCode: 405, deserialization failed,
failed to decode response body, invalid character '<' looking for beginning of value

The raw response confirms the misroute — XML, not the JSON the Config SDK expects:

HTTP/1.1 405
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>MethodNotAllowed</Code><Message>The specified method is not allowed against this resource.</Message></Error>

So none of aws_config_configuration_recorder, aws_config_delivery_channel, aws_config_config_rule, aws_config_organization_managed_rule, or aws_config_configuration_aggregator can be created against MiniStack today — the org-wide config-governance baseline is entirely unrunnable, not even plan-stable past the provider's response decode.

Would you like to contribute this?

  • Yes, I'd like to implement this service and open a PR
  • I can help review/test an implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions