From f0253fe7f6519ca9c615f04f0a464b97e65dff6c Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Wed, 31 May 2017 15:19:21 +0200 Subject: [PATCH] Add DependsOn to UserPool template --- .../aws/package/compile/events/cognitoUserPool/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plugins/aws/package/compile/events/cognitoUserPool/index.js b/lib/plugins/aws/package/compile/events/cognitoUserPool/index.js index a30e1cc25..a48db5ceb 100644 --- a/lib/plugins/aws/package/compile/events/cognitoUserPool/index.js +++ b/lib/plugins/aws/package/compile/events/cognitoUserPool/index.js @@ -103,12 +103,16 @@ class AwsCompileCognitoUserPoolEvents { const userPoolLogicalId = this.provider.naming.getCognitoUserPoolLogicalId(poolName); + const DependsOn = _.map(currentPoolTriggerFunctions, (value) => this + .provider.naming.getLambdaLogicalId(value.functionName)); + const userPoolTemplate = { Type: 'AWS::Cognito::UserPool', Properties: { UserPoolName: poolName, LambdaConfig: lambdaConfig, }, + DependsOn, }; // Check if pool name has been declared in `Resources` and the resource has