UNPKG

serverless

Version:

Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more

14 lines (10 loc) 312 B
'use strict'; const getMskClusterNameToken = (eventSourceArn) => { if (eventSourceArn['Fn::ImportValue']) { return eventSourceArn['Fn::ImportValue']; } else if (eventSourceArn.Ref) { return eventSourceArn.Ref; } return eventSourceArn.split('/')[1]; }; module.exports = getMskClusterNameToken;