Skip to content

Firehose transformation example #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
namedgraph opened this issue Aug 12, 2019 · 7 comments
Closed

Firehose transformation example #95

namedgraph opened this issue Aug 12, 2019 · 7 comments

Comments

@namedgraph
Copy link

namedgraph commented Aug 12, 2019

Amazon Kinesis Data Firehose Data Transformation says

Lambda blueprints are only available in the Node.js and Python languages. You can implement your own functions in other supported languages.

I think this section treats Java unfairly. You provide this whole Lambda SDK for Java yet cannot include a simple example? Even the handler signature is unclear, as you can see from questions on your own support forum as well as on StackOverflow.

Can you please include an example so Java developers do not feel forced to abandon their language of choice and/or google second-hand sites for scraps of information? Thanks.

@namedgraph
Copy link
Author

namedgraph commented Aug 17, 2019

I have open-source one lambda which does an XSLT transformation on Kinesis Firehose records (which have to be XML, or JSON with additional processing):
https://github.com/AtomGraph/XSLTTransform

@msailes
Copy link
Collaborator

msailes commented May 28, 2020

Hi Martynas,

We've passed on your feedback to the docs team. Thank you for posting a link to you own example, that's really useful for the community.

@mberchon
Copy link

Hello,

Given the fact that this page is the 1st hit on google while searching for:
aws lambda firehose java github

I believe there is still an issue

@msailes
Copy link
Collaborator

msailes commented Sep 17, 2021

@mberchon Thanks for the feedback,

I've raised a PR to create a new module to contain examples functions for the less obvious use cases. I'll talk to the team on Monday and see what they think.

I've not tested the example yet, I'll try and do that next week. The KinesisAnalyticsInputPreprocessingResponse response object seems to have the required attributes even if the name isn't particularly helpful in the Firehose use case.

Hopefully this helps a little.

https://github.com/aws/aws-lambda-java-libs/pull/271/files

@namedgraph
Copy link
Author

Maybe this lambda can serve as an example: https://github.com/AtomGraph/XSLTTransform

@mberchon
Copy link

@msailes Thx for the link, it helps

I learned that the lambda function has to implement RequestHandler[KinesisFirehoseEvent, KinesisAnalyticsInputPreprocessingResponse] instead of RequestHandler[KinesisFirehoseEvent,String].

And it works :-)

Thx again,
Mathieu

@liumengkai
Copy link

@msailes thx! help me l lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants