-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
API Gateway -> Kinesis Firehose - New Line Issue #2916
Comments
Update: Tried various ways to get this to work, instead just used the base64encoded value. Seems a bit of a messy way of doing it however...
|
I have this same issue, using the demo data producer in the So do several people on StackOverflow To reproduce, just set up a standard kinesis firehose setup, and follow the instructions given for testing with demo data. The demo producer will write JSON records in series with no delimiter of any kind, as so:
The Redshift consumer will then fail, the reason given being So Amazon's own example doesn't work, on these grounds. |
Closing this for now since it's AWS and not Serverless related. Please post the solution for this here so that others who stumble upon this can read how to resolve it. And feel free to continue the discussion here... |
Oh wow, I forgot all about this.
|
Thanks for the update on this @StoneCypher 👍 |
@cwbeck Did you find any other ways to add new line delimiters? Last Friday AWS released a new update to some regions which broke your solution. Adding For example, this code doesn't work anymore: { Method response body after transformations: {"__type":"SerializationException"} |
@pmuens - i just saw this, a little over a year later you're welcome |
In case it helps the only thing that worked for me was the final answer here, actually adding a literal newline in a string variable and passing that through. https://stackoverflow.com/questions/41159139/how-to-add-a-newline-in-a-mapping-template |
@leigeber |
@leigeber @cheptsov is it still working for you? tried to reproduce to no avail -- maybe I'm not getting right which newline do you mean - can you please help me clarifying what exactly should I do?
|
@soobrosa The key is to have an actual newline in the string before encoding. Something like the following.
|
@leigeber thanks so much for helping me so fast -- it fixed the problem 👍 |
For bug reports:
When using Kinesis Firehose with API Gateway, every variation of trying to add a new line fails when trying to write to S3 despite the docs suggesting this should work: http://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecord.html
Data looks like this instead: -
{"a":"foo","ip":"...","ua":"...","stage":"test"}\n{"a":"foo","ip":"...","ua":"...","stage":"test"}
Output of data in S3 should have new lines... (where \n is an actual new line!)
No parse errors.
The text was updated successfully, but these errors were encountered: