Skip to content

aws lambda commands: rtk corrupts --output json (returns non-JSON schema skeleton, drops field values) #2139

@maxmilian

Description

@maxmilian

Summary

When piping aws lambda commands through rtk, the --output json contract is broken: instead of the real JSON document, rtk emits a lossy schema skeleton (field names mapped to type placeholders like string, int, string[64]) or a one-line table summary with ? placeholders. Actual field values are dropped, and the output is not valid JSON, so any downstream json.load / jq parsing fails.

Environment

  • rtk 0.42.0
  • AWS CLI v2, command run as aws lambda ... (rewritten to rtk aws ... by the Claude Code hook)

Repro

aws lambda get-function-configuration --function-name <fn> --output json

Actual (values replaced by type placeholders, not valid JSON — unquoted keys):

{
  Architectures:
  [
    string
  ]
  CodeSha256: string[64],
  CodeSize: int,
  Environment:
  {
    Variables:
    {
      S3_BUCKET_NAME: string,
      ...

And:

aws lambda get-function --function-name <fn> --output json

Actual (collapsed to a one-line table, ? where fields couldn't be mapped, key fields like Code.ImageUri / Code.ResolvedImageUri missing entirely):

watermark-processor ? ? 2048MB 60s Inactive 2025-10-23

Expected: the real JSON document, byte-for-byte what aws produced (or at minimum valid, lossless JSON honoring --output json).

Impact

  • --output json no longer yields parseable JSON → breaks scripts/agents that pipe to jq / json.load.
  • Critical fields are silently dropped (ImageUri, ResolvedImageUri, CodeSha256, env var values), so the output can't be used to diagnose Lambda container-image issues.

Workaround

rtk proxy aws lambda ... returns the correct, untouched output.

Suggestion

When --output json (or --output yaml) is explicitly requested, rtk should pass the payload through unmodified (or apply only lossless compression), rather than reformatting into a lossy summary/skeleton. Consider scoping the aws lambda summarizer to the default table output only.

Metadata

Metadata

Assignees

No one assigned

    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