@flagsmith/serverless-plugin-canary-deployments
Version:
A Serverless plugin to implement canary deployment of Lambda functions
17 lines (13 loc) • 348 B
JavaScript
const _ = require('lodash/fp')
function replaceIotTopicRuleActionArnWithAlias (iotTopicRule, functionAlias) {
const newRule = _.set(
'Properties.TopicRulePayload.Actions[0].Lambda.FunctionArn',
{ Ref: functionAlias },
iotTopicRule
)
return newRule
}
const Iot = {
replaceIotTopicRuleActionArnWithAlias
}
module.exports = Iot