Skip to content

Commit e576645

Browse files
author
Tom
committed
Generated zip and fixed var reference
1 parent 7a09c58 commit e576645

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In order to effectively use this function, you should already have configured an
1212
# Configuration
1313

1414
This Lambda functions can map stream sources to Kinesis Firehose Delivery Streams in a few different ways (listed in order of preference):
15-
* Manually specified configuration (see [index.js:63](index.js#L63))
15+
* Manually specified configuration (see [index.js:63](index.js#L59))
1616
* A DynamoDB stream naming convention to determine which Delivery Stream to forward to
1717
* An Kinesis Stream Tagging convention
1818
* (Optionally) A default delivery stream.
1.17 MB
Binary file not shown.

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,14 @@ exports.handler = function(event, context) {
470470
var params = {
471471
DeliveryStreamName : deliveryStreamMapping[streamName]
472472
};
473-
firehose.describeDeliveryStream(params, function(err, data) {
473+
exports.firehose.describeDeliveryStream(params, function(err, data) {
474474
if (err) {
475475
// do not continue with the cached mapping
476476
delete deliveryStreamMapping[streamName];
477477

478478
if (!USE_DEFAULT_DELIVERY_STREAMS || deliveryStreamMapping[streamName] == deliveryStreamMapping['DEFAULT']) {
479-
finish(event, ERROR, "Delivery Stream " + deliveryStreamMapping[streamName] + " does not exist in region " + region);
479+
finish(event, ERROR, "Could not find suitable delivery stream for " + streamName + " and the " +
480+
"default delivery stream (" + deliveryStreamMapping['DEFAULT'] + ") either doesn't exist or is disabled.");
480481
} else {
481482
deliveryStreamMapping[streamName] = deliveryStreamMapping['DEFAULT'];
482483
exports.verifyDeliveryStreamMapping(streamName, event, callback);

0 commit comments

Comments
 (0)