server-control-s3 0.0.12 → 0.0.13
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/README.md +1 -1
- package/package.json +1 -1
- package/src/index.js +8 -5
package/README.md
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -251,22 +251,25 @@ function _getGroupData(done) {
|
|
|
251
251
|
);
|
|
252
252
|
},
|
|
253
253
|
(done) => {
|
|
254
|
+
const lt =
|
|
255
|
+
asg.LaunchTemplate ||
|
|
256
|
+
asg.MixedInstancesPolicy?.LaunchTemplate?.LaunchTemplateSpecification;
|
|
254
257
|
const opts = {
|
|
255
|
-
LaunchTemplateId:
|
|
256
|
-
Versions: [
|
|
258
|
+
LaunchTemplateId: lt?.LaunchTemplateId,
|
|
259
|
+
Versions: [lt?.Version],
|
|
257
260
|
};
|
|
258
261
|
ec2.describeLaunchTemplateVersions(opts, (err, data) => {
|
|
259
262
|
if (err) {
|
|
260
263
|
_errorLog('_getGroupData: launch template fetch error:', err);
|
|
261
|
-
} else if (data
|
|
262
|
-
err = 'launch_template_not_found';
|
|
263
|
-
} else {
|
|
264
|
+
} else if (data?.LaunchTemplateVersions?.length > 0) {
|
|
264
265
|
launch_template = data.LaunchTemplateVersions[0];
|
|
265
266
|
const ud = launch_template.LaunchTemplateData.UserData;
|
|
266
267
|
if (ud) {
|
|
267
268
|
const s = Buffer.from(ud, 'base64').toString('utf8');
|
|
268
269
|
launch_template.LaunchTemplateData.UserData = s;
|
|
269
270
|
}
|
|
271
|
+
} else {
|
|
272
|
+
err = 'launch_template_not_found';
|
|
270
273
|
}
|
|
271
274
|
done(err);
|
|
272
275
|
});
|