You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also restrict permissions given to AWS services by providing
177
+
a source account or ARN (representing the account and identifier of the resource
178
+
that accesses the function or layer).
179
+
180
+
For more information, see
181
+
[Granting function access to AWS services](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-serviceinvoke)
182
+
in the AWS Lambda Developer Guide.
183
+
184
+
### Grant function access to an AWS Organization
185
+
186
+
```ts
187
+
// Grant permissions to an entire AWS organization
[Granting function access to an organization](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xorginvoke)
[Granting function access to other accounts](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke)
224
+
in the AWS Lambda Developer Guide.
225
+
226
+
### Grant function access to unowned principals
227
+
179
228
Providing an unowned principal (such as account principals, generic ARN
180
229
principals, service principals, and principals in other accounts) to a call to
181
230
`fn.grantInvoke` will result in a resource-based policy being created. If the
// PrincipalOrgID cannot be combined with any other conditions
626
+
if(principalOrgID&&(sourceArn||sourceAccount)){
627
+
thrownewError('PrincipalWithConditions had unsupported condition combinations for Lambda permission statement: principalOrgID cannot be set with other conditions.');
0 commit comments