mapbox / cloudfriend

Helper functions for assembling CloudFormation templates in JavaScript
ISC License
69 stars 9 forks source link

Add Kinesis Firehose shortcut #71

Closed danmactough closed 5 years ago

danmactough commented 5 years ago

Adds a new shortcut for creating a Kinesis Firehose that writes out to the specified S3 bucket. It can be a "direct put" firehose (with firehose.putRecord() or firehose.putRecordBatch()), or you can specify an input Kinesis Stream ARN.

danmactough commented 5 years ago

Thanks @rclark. I didn't want to over-engineer it before getting feedback; I appreciate your points.

I think the way we should model the firehose shortcuts is:

So, I'd like to limit this PR to the base class + S3 destination.

Unlike the Lambda shortcut, the base firehose wouldn't be usable without the additional functionality of one of the subclasses (or your own custom subclass).

rclark commented 5 years ago

Unlike the Lambda shortcut, the base firehose wouldn't be usable without the additional functionality

That's fine -- just don't have the cloudfriend module export the "abstract" class?

danmactough commented 5 years ago

just don't have the cloudfriend module export the "abstract" class?

That's what I'm thinking, but the downside would be that you wouldn't be able to implement a custom subclass. I think that better fits the spirit of this project, though.

danmactough commented 5 years ago

@rclark Implemented something via 807b43c. Thoughts?

danmactough commented 5 years ago

Last thing: could you add a sentence or two here describing the alarm that is created?

Done via 9d2eebd