Tyler Webb
27de6fd46e
fix(lambda): enforce function policies when API Gateway invokes a function ( #8786 )
...
With IAM enforcement on, a REST API AWS_PROXY or AWS Lambda integration invoked the function whatever its function policy said. On AWS API Gateway invokes the function as apigateway.amazonaws.com and only the function policy decides the call, so a missing or mis-scoped AddPermission breaks the integration.
Before invoking, the integration now asks ServiceCallAuthorizer whether apigateway may perform lambda:InvokeFunction on the function, with aws:SourceArn set to the request's execute-api ARN, carrying the concrete request path and the function's Region, and aws:SourceAccount to the API's account. For an ANY method the ARN carries the request's verb, as a Lambda authorizer's methodArn does. A refused call answers 500 {"message": "Internal server error"} through the API_CONFIGURATION_ERROR gateway response, and the function is not invoked. A function that does not exist is refused the same way, since Lambda authorizes before it checks existence. An integration with credentials invokes as that role and is not checked.
With enforcement off nothing changes: a missing function still answers 404 Function not found.
Part of #4898
2026-11-21 15:19:56 -04:00
..
2026-11-04 21:50:47 -06:00
2026-11-17 06:58:24 -04:00
2026-11-12 11:15:12 -04:00
2026-11-15 08:33:24 -04:00
2026-11-21 15:19:56 -04:00
2026-11-13 17:00:32 -04:00
2026-09-11 17:55:48 -04:00
2026-11-10 18:28:30 -04:00
2026-11-18 08:27:23 -04:00
2026-11-17 19:16:51 -04:00
2026-11-15 18:29:22 -04:00
2026-11-09 22:36:59 -04:00
2026-11-15 18:09:00 -04:00
2026-10-26 06:50:32 -04:00
2026-09-12 11:31:20 -04:00
2026-11-21 09:18:38 -04:00
2026-10-18 14:50:09 -04:00
2026-11-19 18:26:50 -04:00
2026-09-06 23:54:37 -04:00
2026-11-13 22:40:31 -04:00
2026-10-12 11:28:04 -04:00
2026-11-21 15:03:44 -04:00
2026-11-02 15:15:59 -04:00
2026-11-19 18:26:08 -04:00
2026-08-17 00:00:49 -05:00
2026-11-15 23:39:48 -04:00
2026-10-30 07:27:51 -04:00
2026-09-17 13:53:35 -04:00
2026-11-19 11:57:03 -04:00
2026-11-15 13:49:06 -04:00
2026-11-18 21:10:52 -04:00
2026-10-26 17:27:41 -04:00
2026-08-30 14:44:08 -05:00
2026-10-26 07:31:28 -04:00
2026-11-14 21:19:54 -04:00
2026-09-04 12:16:18 -04:00
2026-08-30 14:44:12 -05:00
2026-11-14 19:35:00 -04:00
2026-08-30 15:15:49 -04:00
2026-09-07 21:49:39 -05:00
2026-11-10 10:46:59 -04:00
2026-11-13 17:10:30 -04:00
2026-09-11 22:30:02 -04:00
2026-09-07 18:31:48 -04:00
2026-09-24 15:08:34 -04:00
2026-10-17 08:07:21 -04:00
2026-11-18 17:19:46 -04:00
2026-11-18 15:27:20 -04:00
2026-11-20 22:42:51 -04:00
2026-11-11 14:08:37 -04:00
2026-11-19 20:36:25 -04:00
2026-11-17 05:57:04 -04:00
2026-11-20 07:33:23 -04:00
2026-11-13 16:30:10 -04:00
2026-11-21 12:30:16 -04:00
2026-06-25 19:16:51 -05:00
2026-11-21 13:19:39 -04:00
2026-11-02 14:50:12 -04:00
2026-11-20 07:32:37 -04:00
2026-11-20 21:40:37 -04:00
2026-11-20 22:43:18 -04:00
2026-11-21 11:45:08 -04:00
2026-11-19 08:04:49 -04:00
2026-11-03 17:27:11 -04:00
2026-11-03 13:49:06 -04:00
2026-11-17 20:20:48 -04:00
2026-10-25 13:38:39 -04:00
2026-11-19 11:14:30 -04:00
2026-10-19 16:45:15 -04:00
2026-11-21 15:19:56 -04:00
2026-09-10 16:34:41 -04:00
2026-11-20 14:09:47 -04:00
2026-11-01 12:22:49 -04:00
2026-11-19 19:14:50 -04:00
2026-11-15 00:38:16 -04:00
2026-09-22 16:16:34 -04:00
2026-11-20 07:11:09 -04:00
2026-11-15 01:08:54 -04:00
2026-11-19 18:32:56 -04:00
2026-11-02 07:47:05 -04:00
2026-11-21 15:19:56 -04:00
2026-07-10 20:43:42 -05:00
2026-11-09 11:37:23 -04:00
2026-10-26 06:45:35 -04:00
2026-10-03 22:04:03 -04:00
2026-11-17 05:06:39 -04:00
2026-11-14 23:04:43 -04:00
2026-11-15 13:47:59 -04:00
2026-09-04 09:45:29 -04:00
2026-08-27 09:23:52 -04:00
2026-09-12 08:59:21 -04:00
2026-11-08 18:37:00 -04:00
2026-11-12 16:10:12 -04:00
2026-11-20 14:07:01 -04:00
2026-11-19 13:33:35 -04:00
2026-11-18 08:27:23 -04:00
2026-05-13 01:34:19 -05:00
2026-11-06 09:11:30 -04:00
2026-10-30 14:44:18 -04:00
2026-10-15 16:49:23 -04:00
2026-11-21 10:01:54 -04:00
2026-11-14 01:06:59 -04:00
2026-11-15 19:54:04 -04:00
2026-11-21 12:40:26 -04:00
2026-11-11 22:19:38 -04:00
2026-11-05 04:57:31 -04:00
2026-11-05 04:57:31 -04:00
2026-10-24 18:45:19 -04:00
2026-11-19 07:05:14 -04:00
2026-11-18 23:50:54 -04:00
2026-08-01 15:28:54 -05:00
2026-11-17 00:21:46 -04:00
2026-11-15 19:56:31 -04:00
2026-11-19 22:14:23 -04:00
2026-11-17 16:23:37 -04:00
2026-11-18 21:25:47 -04:00
2026-11-14 21:33:20 -04:00
2026-11-09 11:37:23 -04:00
2026-11-17 09:15:05 -04:00
2026-11-04 13:52:00 -04:00
2026-11-21 09:37:57 -04:00
2026-11-09 09:08:00 -04:00
2026-11-20 15:00:04 -04:00
2026-11-19 11:04:10 -04:00
2026-11-20 20:12:47 -04:00
2026-11-15 08:13:41 -04:00
2026-09-10 16:34:41 -04:00
2026-11-14 10:30:14 -04:00
2026-11-16 16:08:14 -04:00
2026-11-20 20:14:00 -04:00
2026-10-16 14:01:24 -04:00
2026-09-21 14:11:16 -04:00
2026-10-20 07:27:05 -04:00
2026-05-21 18:20:09 -05:00
2026-10-04 18:19:43 -04:00
2026-09-01 14:47:33 -04:00
2026-11-15 08:20:31 -04:00
2026-10-07 23:47:52 -04:00
2026-11-11 08:50:26 -04:00