quidproquo-actionprocessor-awslambda 0.0.112 → 0.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/awsNamingUtils.js +12 -1
- package/package.json +1 -1
package/lib/awsNamingUtils.js
CHANGED
|
@@ -92,13 +92,24 @@ const getCFExportNameDistributionIdArnFromConfig = (webEntryName, qpqConfig, ser
|
|
|
92
92
|
return (0, exports.getQpqRuntimeResourceName)(webEntryName, application, service, environment, feature, 'distribution-id-export');
|
|
93
93
|
};
|
|
94
94
|
exports.getCFExportNameDistributionIdArnFromConfig = getCFExportNameDistributionIdArnFromConfig;
|
|
95
|
+
function insertPipes(input) {
|
|
96
|
+
let output = '';
|
|
97
|
+
for (let i = 0; i < input.length; i++) {
|
|
98
|
+
output += input[i] + '|';
|
|
99
|
+
}
|
|
100
|
+
// remove the last '|' character
|
|
101
|
+
output = output.slice(0, -1);
|
|
102
|
+
return output;
|
|
103
|
+
}
|
|
95
104
|
const getEventBusSnsTopicArn = (eventBusName, qpqConfig, module, environment, application, feature) => {
|
|
96
105
|
const topicName = (0, exports.getConfigRuntimeResourceName)(eventBusName, application, module, environment, feature);
|
|
97
106
|
const accountInfo = (0, quidproquo_config_aws_1.getAwsServiceAccountInfoByDeploymentInfo)(qpqConfig, module, environment, feature, application);
|
|
98
107
|
const awsAccountId = accountInfo.awsAccountId;
|
|
99
108
|
const region = accountInfo.awsRegion;
|
|
100
109
|
const arn = `arn:aws:sns:${region}:${awsAccountId}:${topicName}`;
|
|
101
|
-
console.log('
|
|
110
|
+
console.log('awsAccountId: ', awsAccountId);
|
|
111
|
+
console.log('TopicARN: ', insertPipes(arn));
|
|
112
|
+
console.log('accountInfo: ', JSON.stringify(accountInfo, null, 2));
|
|
102
113
|
return arn;
|
|
103
114
|
};
|
|
104
115
|
exports.getEventBusSnsTopicArn = getEventBusSnsTopicArn;
|