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.
Summary
When piping
aws lambdacommands through rtk, the--output jsoncontract is broken: instead of the real JSON document, rtk emits a lossy schema skeleton (field names mapped to type placeholders likestring,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 downstreamjson.load/jqparsing fails.Environment
rtk 0.42.0aws lambda ...(rewritten tortk aws ...by the Claude Code hook)Repro
Actual (values replaced by type placeholders, not valid JSON — unquoted keys):
And:
Actual (collapsed to a one-line table,
?where fields couldn't be mapped, key fields likeCode.ImageUri/Code.ResolvedImageUrimissing entirely):Expected: the real JSON document, byte-for-byte what
awsproduced (or at minimum valid, lossless JSON honoring--output json).Impact
--output jsonno longer yields parseable JSON → breaks scripts/agents that pipe tojq/json.load.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 theaws lambdasummarizer to the default table output only.