Files
floci/compatibility-tests/sdk-test-awscli/test
TATSUNO “Taz” Yasuhiro 7e6439cf86 feat(lambdaweb): check the execution role as AWS does (#6347)
* feat(lambdaweb): check the execution role as AWS does

AWS refuses a revision whose execution role is in another account with
403 AccessDeniedException. It refuses a role that does not exist or does
not trust lambda.amazonaws.com with 400 ValidationException, and that
check gives no aws:SourceAccount or aws:SourceArn. An environment
assumes the role with the function as its source, and a request gets
502 Platform.CannotAssumeRole when Lambda can no longer assume it.

* fix(iam): match a wildcard principal and the service keys in service trust

{"AWS": "*"} lets Lambda assume a role, and a Deny on it refuses the role.
Lambda sets aws:PrincipalIsAWSService to true and aws:PrincipalServiceName
to its principal when it checks the role and when an environment assumes it.

* fix(lambdaweb): answer CannotAssumeRole when the role goes during a start

A role deleted after the trust check gave the container the account's
placeholder credentials. AWS answers 502 Platform.CannotAssumeRole for a
deleted role.
2026-10-23 10:50:14 -04:00
..
2026-10-21 06:47:06 -04:00