Skip to content

Commit 4c1e107

Browse files
authored
Merge pull request dherault#244 from arabold/feature/support-aws-iam-authorizer
Added support for authorizer type `AWS_IAM`
2 parents bc08d85 + 1616c00 commit 4c1e107

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,17 @@ class Offline {
731731
let authStrategyName = null;
732732
if (endpoint.authorizer) {
733733
let authFunctionName = endpoint.authorizer;
734+
if (typeof authFunctionName === 'string' && authFunctionName.toUpperCase() === 'AWS_IAM') {
735+
this.serverlessLog('WARNING: Serverless Offline does not support the AWS_IAM authorization type');
736+
737+
return null;
738+
}
734739
if (typeof endpoint.authorizer === 'object') {
740+
if (endpoint.authorizer.type && endpoint.authorizer.type.toUpperCase() === 'AWS_IAM') {
741+
this.serverlessLog('WARNING: Serverless Offline does not support the AWS_IAM authorization type');
742+
743+
return null;
744+
}
735745
if (endpoint.authorizer.arn) {
736746
this.serverlessLog(`WARNING: Serverless Offline does not support non local authorizers: ${endpoint.authorizer.arn}`);
737747

0 commit comments

Comments
 (0)