Example #1
0
						return new Promise(function(resolve, reject) {
							var params = {
								InstanceId: instanceId,
								ShouldDecrementDesiredCapacity: true
							};
							console.log('terminateInstanceInAutoScalingGroup', params);
							actualInstancesTerminated.push(instanceId);
							autoscaling.terminateInstanceInAutoScalingGroup(params, function(err, data) {
								if (err) {
									reject(err);
								} else {
									console.log('Removed ' + instanceId + ' and decremented asg');
									resolve(data);
								}
							})
						});