Skip to content

Commit dd1e863

Browse files
author
Apoorva P
committed
Add RequestValidator, Model to Per function
1 parent 5413b02 commit dd1e863

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/migration-strategy/per-function.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ module.exports = class PerFunction extends BaseStrategy {
7979
resourceLambdasMap.get(resourceName).add(normalizedLambdaName);
8080
});
8181
});
82-
82+
// TODO AWS::ApiGateway::Model, AWS::ApiGateway::RequestValidator
8383
// Resolve all AWS::ApiGateway::Resource that map single function, only those will be moved to
8484
// nested per lambda distributed stacks
8585
resourceLambdasMap.forEach((normalizedFunctionNames, resourceName) => {
@@ -94,7 +94,11 @@ module.exports = class PerFunction extends BaseStrategy {
9494
getDestination(resource, logicalId) {
9595
let normalizedLambdaName;
9696

97-
if (['AWS::ApiGateway::Method', 'AWS::ApiGateway::Resource'].indexOf(resource.Type) !== -1) {
97+
if ([
98+
'AWS::ApiGateway::Method',
99+
'AWS::ApiGateway::Resource',
100+
'AWS::ApiGateway::RequestValidator',
101+
'AWS::ApiGateway::Model'].indexOf(resource.Type) !== -1) {
98102
normalizedLambdaName = this.getApiGatewayDestination(logicalId);
99103
} else {
100104
normalizedLambdaName = this.getLambdaDestination(logicalId);

0 commit comments

Comments
 (0)