Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(apigatewayv2-integrations): integrations of imported lambda funct…
…ions do not get configured (#27861) Closes #18965 `HTTPLambdaIntegration` using imported lambda functions are currently not being configured. This is due to the fact that the `canCreatePermissions` property is set to false in imported lambdas, so the lambda permissions are never created. This PR fixes this issue by: - Setting the `sameEnvironment` property to `true` for lambdas imported using `fromFunctionName()` - Adding clarification in documentation about imported lambdas needing to belong to the same stack account and region as that of the lambda being imported from be able to add permissions - Adding a new warning to be thrown when the `addPermissions()` function is called on a lambda with `canCreatePermissions` set to false. The new integ test file tests that imported lambdas using `fromFunctionName()` and `fromFunctionAttributes()` (with `sameEnvironment` set to `true`) work as expected, including on sub-route integrations. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information