aws lambda commands: rtk corrupts `--output json` (returns non-JSON schema skeleton, drops field values)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
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 tortk 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 jsonno longer yields parseable JSON → breaks scripts/agents that pipe tojq/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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the AWS/Lambda summarizer and the handling of explicit --output json and --output yaml options. Reproduce the get-function-configuration and get-function commands, compare their output with direct AWS CLI output, and inspect the rtk proxy workaround. Done means explicitly requested structured output remains valid and lossless while default table summarization still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, rust
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100