aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

chore(compute): re-tighten MicroVM-facing IAM if AWS exposes usable condition keys

Open
#736 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
143
Forks
46
Avg merge
3d 9h
Merged PRs (30d)
20

Description

### Context

ADR-021's Lambda MicroVMs backend runs with deliberately relaxed IAM in two places, both proven necessary by controlled live experiments (evidence: ADR-021 §4 + `docs/verification/645-p2-smoke-runbook.md`):

1. **Role trust**: the build, execution, and connector-operator roles trust `lambda.amazonaws.com` with **no** `aws:SourceAccount`/`aws:SourceArn` condition — the service presents no source key when assuming them (conditioned trust → deterministic `CREATE_FAILED` / unassumable role).
2. **PassRole**: the orchestrator's grant on the execution role and the bootstrap `MicrovmPassRoles` statement carry **no** `iam:PassedToService` condition — the condition is denied on the `RunMicrovm` and CloudFormation paths (two-arm experiments, verbatim denials in the ADR). Candidate service principals (`microvms.lambda.amazonaws.com` etc.) were all `implicitDeny`, and CloudTrail emits no `lambda-microvms` events, so the value the authorizer would match cannot currently be observed.

Compensating controls in place: exact-ARN / name-prefix resource scoping, backend-conditional bootstrap policy, orchestrator-only pass path for the execution role.

### Ask

When AWS documents (or the service starts presenting) usable condition keys for Lambda MicroVMs role assumption and PassRole:
- add the trust conditions back to all three roles
- restore `iam:PassedToService` on both PassRole grants
- delete the compensating-control prose from ADR-021 §4 / SECURITY.md / DEPLOYMENT_ROLES.md

The ADR says "revisit if AWS documents it" — this issue is that revisit's handle. Consider also raising via internal AWS channels: the service team may simply need to publish the authorization-context documentation.

Refs #645, PR #733, ADR-021.

Contributor guide

Open the contributing guide

Research direction

Start with ADR-021 §4 and docs/verification/645-p2-smoke-runbook.md, then inspect the three role trust policies and the two PassRole grants described in the issue. Proceed only once AWS documents or exposes usable Lambda MicroVM condition keys; done means restoring the trust and iam:PassedToService conditions and removing the compensating-control prose from ADR-021 §4, SECURITY.md, and DEPLOYMENT_ROLES.md.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
authorization, cloud, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.