Skip to content

fix(lambda,iam): GetFunctionConcurrency empty, GetUser stable, UpdateRole keeps Description#2014

Merged
vieiralucas merged 1 commit into
mainfrom
wt-bh-svc
Jun 28, 2026
Merged

fix(lambda,iam): GetFunctionConcurrency empty, GetUser stable, UpdateRole keeps Description#2014
vieiralucas merged 1 commit into
mainfrom
wt-bh-svc

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jun 27, 2026

Copy link
Copy Markdown
Member

Bug-hunt batch 3 (cycle 6). Three contained correctness fixes.

  • Lambda GetFunctionConcurrency (HIGH). Returned ReservedConcurrentExecutions: 0 for a function with no reserved concurrency — but 0 means "throttle to zero" in Lambda, the opposite of unset, so Terraform reads false drift. AWS returns an empty body when none is configured.
  • IAM GetUser with no UserName (MEDIUM). Fabricated a fresh random user (new AIDA id + now() date) every call. Now resolves the caller from their access-key id and returns that real user, otherwise a stable synthetic identity (deterministic id/date) so repeated calls + follow-ups are consistent.
  • IAM UpdateRole (MEDIUM). Cleared Description whenever it was omitted, so update-role --max-session-duration ... silently wiped it. Description and MaxSessionDuration are independent optionals; Description is now only changed when supplied.

Tests

E2E for each: empty-vs-set concurrency round-trip, GetUser determinism, UpdateRole preserves description. iam lib suite (496) green.

Builds clean; clippy --all-targets -D warnings clean; fmt clean.


Summary by cubic

Fixes Lambda reserved concurrency, IAM GetUser resolution, and IAM UpdateRole description handling to match AWS and prevent drift or accidental wipes.

  • Bug Fixes
    • Lambda GetFunctionConcurrency: return empty body when no reserved concurrency (not 0).
    • IAM GetUser: without UserName, resolve caller from access key; otherwise return a stable synthetic user (deterministic id/date).
    • IAM UpdateRole: keep existing Description unless a new Description is provided.

Written for commit 9b8d56c. Summary will update on new commits.

Review in cubic

…Role keeps Description

Three contained correctness fixes from the cycle-6 bug audit.

- Lambda GetFunctionConcurrency returned `ReservedConcurrentExecutions: 0` for
  a function with no reserved concurrency. In Lambda, 0 means "throttle to
  zero" — the opposite of unset — so Terraform/clients read the function as
  fully throttled. AWS returns an empty body when none is configured; now we do
  too.
- IAM GetUser with no UserName fabricated a brand-new random user (fresh AIDA
  id + now() date) on every call. It now resolves the caller from their access
  key id and returns that real user when present, otherwise a stable synthetic
  identity (deterministic id/date) so repeated calls and follow-ups by the
  returned name are consistent.
- IAM UpdateRole cleared Description whenever it was omitted, so
  `update-role --max-session-duration ...` silently wiped the description.
  Description and MaxSessionDuration are independent optionals; Description is
  now only changed when supplied.

Adds e2e tests for each.
@vieiralucas vieiralucas merged commit 2f8de8b into main Jun 28, 2026
105 checks passed
@vieiralucas vieiralucas deleted the wt-bh-svc branch June 28, 2026 00:25
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