quidproquo-actionprocessor-awslambda 0.0.113 → 0.0.114
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 +1 -14
- package/package.json +1 -1
package/lib/awsNamingUtils.js
CHANGED
|
@@ -92,24 +92,11 @@ 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
|
-
}
|
|
104
95
|
const getEventBusSnsTopicArn = (eventBusName, qpqConfig, module, environment, application, feature) => {
|
|
105
96
|
const topicName = (0, exports.getConfigRuntimeResourceName)(eventBusName, application, module, environment, feature);
|
|
106
97
|
const accountInfo = (0, quidproquo_config_aws_1.getAwsServiceAccountInfoByDeploymentInfo)(qpqConfig, module, environment, feature, application);
|
|
107
98
|
const awsAccountId = accountInfo.awsAccountId;
|
|
108
99
|
const region = accountInfo.awsRegion;
|
|
109
|
-
|
|
110
|
-
console.log('awsAccountId: ', awsAccountId);
|
|
111
|
-
console.log('TopicARN: ', insertPipes(arn));
|
|
112
|
-
console.log('accountInfo: ', JSON.stringify(accountInfo, null, 2));
|
|
113
|
-
return arn;
|
|
100
|
+
return `arn:aws:sns:${region}:${awsAccountId}:${topicName}`;
|
|
114
101
|
};
|
|
115
102
|
exports.getEventBusSnsTopicArn = getEventBusSnsTopicArn;
|