serverless-plugin-canary-deployments
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -0,1 +1,4 @@ | ||
# 0.4.4 (12.12.2018) | ||
- Add compatibility with `serverless-plugin-split-stacks` | ||
# 0.4.3 (21.10.2018) | ||
@@ -2,0 +5,0 @@ - Allow referencing alarms by their name |
@@ -289,3 +289,16 @@ { | ||
"Uri": { | ||
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${HelloLambdaFunctionAliasLive}/invocations" | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:aws:apigateway:", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
":lambda:path/2015-03-31/functions/", | ||
{ | ||
"Ref": "HelloLambdaFunctionAliasLive" | ||
}, | ||
"/invocations" | ||
] | ||
] | ||
} | ||
@@ -292,0 +305,0 @@ }, |
@@ -193,3 +193,16 @@ { | ||
"Uri": { | ||
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${HelloLambdaFunctionAliasLive}/invocations" | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:aws:apigateway:", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
":lambda:path/2015-03-31/functions/", | ||
{ | ||
"Ref": "HelloLambdaFunctionAliasLive" | ||
}, | ||
"/invocations" | ||
] | ||
] | ||
} | ||
@@ -196,0 +209,0 @@ }, |
@@ -289,3 +289,16 @@ { | ||
"Uri": { | ||
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${HelloLambdaFunctionAliasLive}/invocations" | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:aws:apigateway:", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
":lambda:path/2015-03-31/functions/", | ||
{ | ||
"Ref": "HelloLambdaFunctionAliasLive" | ||
}, | ||
"/invocations" | ||
] | ||
] | ||
} | ||
@@ -292,0 +305,0 @@ }, |
@@ -5,7 +5,9 @@ const _ = require('lodash/fp'); | ||
const aliasArn = [ | ||
'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${', | ||
functionAlias, | ||
'}/invocations' | ||
].join(''); | ||
return { 'Fn::Sub': aliasArn }; | ||
'arn:aws:apigateway:', | ||
{ 'Ref': 'AWS::Region' }, | ||
':lambda:path/2015-03-31/functions/', | ||
{ 'Ref': functionAlias }, | ||
'/invocations' | ||
]; | ||
return { 'Fn::Join': [ '', aliasArn ] }; | ||
} | ||
@@ -12,0 +14,0 @@ |
@@ -36,7 +36,9 @@ const { expect } = require('chai'); | ||
const uriWithAwsVariables = [ | ||
'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${', | ||
functionAlias, | ||
'}/invocations' | ||
].join(''); | ||
const uri = { 'Fn::Sub': uriWithAwsVariables }; | ||
'arn:aws:apigateway:', | ||
{ Ref: 'AWS::Region' }, | ||
':lambda:path/2015-03-31/functions/', | ||
{ Ref: functionAlias }, | ||
'/invocations' | ||
]; | ||
const uri = { 'Fn::Join': [ '', uriWithAwsVariables ] }; | ||
const expected = _.set('Properties.Integration.Uri', uri, apiGatewayMethod); | ||
@@ -43,0 +45,0 @@ const actual = ApiGateway.replaceMethodUriWithAlias(apiGatewayMethod, functionAlias); |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "A Serverless plugin to implement canary deployment of Lambda functions", | ||
@@ -9,0 +9,0 @@ "main": "serverless-plugin-canary-deployments.js", |
161247
5383