Skip to content

feat: add minimal set of aws-config-* functions (BMA-6)#353

Open
ai-cora wants to merge 1 commit into
masterfrom
feat/BMA-6-aws-config-functions
Open

feat: add minimal set of aws-config-* functions (BMA-6)#353
ai-cora wants to merge 1 commit into
masterfrom
feat/BMA-6-aws-config-functions

Conversation

@ai-cora
Copy link
Copy Markdown
Collaborator

@ai-cora ai-cora commented May 12, 2026

Summary

Adds lib/aws-config-functions with seven listing functions covering the top-level resource types in AWS Config:

Function What it lists
aws-config-recorders Configuration recorder definitions
aws-config-recorder-status Whether recorders are currently recording
aws-config-rules Config rules + state + source
aws-config-rule-compliance Compliance status for given rule(s)
aws-config-delivery-channels Delivery channels
aws-config-aggregators Configuration aggregators
aws-config-conformance-packs Conformance packs

Follows existing BMA conventions: skim-stdin for piped input, __bma_read_filters for grep-style filtering on listings, columnise for output, USAGE/EXAMPLE comments, JMESPath queries.

Design note

Scope agreed with @mbailey was six functions, but I split aws-config-recorders / aws-config-recorder-status mirroring the existing cloudtrails / cloudtrail-status pattern. The two underlying AWS API calls (describe-configuration-recorders and describe-configuration-recorder-status) return genuinely different shapes, and composing them via skim-stdin (aws-config-recorders | aws-config-recorder-status) is more BMA-idiomatic than a merged view. Happy to fold them back into one if preferred.

Test plan

  • make build regenerates functions, aliases, bash_completion.sh, docs/command-reference.md
  • make check -- passes after commit
  • make test -- 15 passed, 0 failed
  • bash -n lib/aws-config-functions -- clean
  • Manual smoke test against a real AWS account with Config enabled (no creds in this session)

🤖 Generated with Claude Code

Adds a new lib/aws-config-functions file with seven listing functions
covering the top-level resource types in AWS Config:

  aws-config-recorders          # configuration recorder definitions
  aws-config-recorder-status    # whether recorders are currently recording
  aws-config-rules              # Config rules + state + source
  aws-config-rule-compliance    # compliance status for given rule(s)
  aws-config-delivery-channels  # delivery channels
  aws-config-aggregators        # configuration aggregators
  aws-config-conformance-packs  # conformance packs

Functions follow the existing bash-my-aws conventions: skim-stdin for
piped input, __bma_read_filters for grep-style filtering on listing
functions, columnise for output, USAGE/EXAMPLE comments above each
function, JMESPath queries for shaping AWS CLI output.

The cloudtrails / cloudtrail-status split is mirrored here as
aws-config-recorders / aws-config-recorder-status because the two
AWS API calls (describe-configuration-recorders and
describe-configuration-recorder-status) return different shapes and
composability via skim-stdin is the more BMA-idiomatic way to join them.

Generated files (functions, aliases, docs/command-reference.md) are
regenerated by scripts/build and committed alongside.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ai-cora ai-cora requested a review from mbailey as a code owner May 12, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant