Sam
11/14/2021, 12:37 PMSimon Reilly
11/14/2021, 1:49 PM const tenantPolicy = new PolicyStatement({
sid: 'AllowExecuteApiOnSpecificOrgRoute',
effect: Effect.ALLOW,
actions: ['execute-api:Invoke'],
resources: [
`arn:aws:execute-api:${this.region}:${this.account}:${this.api.httpApi.apiId}/$default/GET/\${aws:PrincipalTag/org}/*`,
],
})
Other options is do it inside the lambda, by looking at the group's, and claims of the user if you are using an API gateway JWT authorizer.Frank