You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Kinesis Firehose Response Record data class #2440
Constructing response objects for use in Kinesis Firehose transformation functions.
This is a continuation of #1059 which describes the event object as well as the response object. The implementation for that issue can be found at #1540, but that does not include the response object.
Solution/User Experience
A data class that can be populated during the execution of a function that will be properly formed as a response to a KinesisFirehoseEvent invocation.
I believe it would be possible to re-use the KinesisFirehoseEvent data class from the utilities.data_classes module, but this seems like it is more geared for the event invocation object as opposed to the response object.
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
Hi @troyswanson thank you for opening this! Since the response object can be quite complex, I agree that we could benefit with adding those classes to our dataclasses.
Hi @troyswanson
Thanks for your suggestion. We understand that you are using Kinesis Firehose to achieve batch processing. However, Kinesis Firehose is not currently supported in batch processing because it doesn't have batch failure pipe as SQS, Kinesis Datastream does.
If you think it would be helpful, we would like to see you submit a RFC specifically for supporting Kinesis Firehose in batch processing. This would allow us to focus on the main issue in this feature request, which is supporting the Kinesis Firehose Response Record data class.
Leandro assigned this task to me and I'm working to add the support, Current target is to submit a pull request by the end of next week. I'll ping you when there an update and you can review before we merge it. We appreciate your feedback and we will keep you updated on our progress.
Activity
boring-cyborg commentedon Jun 12, 2023
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
troyswanson commentedon Jun 13, 2023
Been playing with a custom implementation for my project. Thought I would share it here:
(This uses Python 3.9 so the type alias syntax is a little different than current.)
myproj/dataclasses/kinesis_firehose.pyExample implementation:
tests/conftest.pytests/test_kinesis_firehose.pyrubenfonseca commentedon Jun 15, 2023
Hi @troyswanson thank you for opening this! Since the response object can be quite complex, I agree that we could benefit with adding those classes to our dataclasses.
For reference, here's the Go types (https://github.com/aws/aws-lambda-go/blob/main/events/firehose.go#L28-L49)
I can see that you already have some code too. I would love if you could submit a PR for this! What do you think?
3 remaining items
troyswanson commentedon Aug 18, 2023
@leandrodamascena Cool, thank you!
The code that I included has a batch processor built in, but it would probably be more appropriate to add that functionality into the https://docs.powertools.aws.dev/lambda/python/latest/utilities/batch/ tooling that already exists.
I admittedly don't have experience with that part of the Powertools library.
Anyways, I'm excited to see your implementation!
roger-zhangg commentedon Aug 24, 2023
Hi @troyswanson
Thanks for your suggestion. We understand that you are using Kinesis Firehose to achieve batch processing. However, Kinesis Firehose is not currently supported in batch processing because it doesn't have batch failure pipe as SQS, Kinesis Datastream does.
If you think it would be helpful, we would like to see you submit a RFC specifically for supporting Kinesis Firehose in batch processing. This would allow us to focus on the main issue in this feature request, which is supporting the Kinesis Firehose Response Record data class.
Leandro assigned this task to me and I'm working to add the support, Current target is to submit a pull request by the end of next week. I'll ping you when there an update and you can review before we merge it. We appreciate your feedback and we will keep you updated on our progress.
troyswanson commentedon Aug 24, 2023
@roger-zhangg Thanks for the update!
roger-zhangg commentedon Sep 1, 2023
Hey @troyswanson I'm excited to share the PR I've opened #3029. We would love to see you review it and share your comments. Thanks!
github-actions commentedon Sep 14, 2023
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
github-actions commentedon Sep 15, 2023
This is now released under 2.25.0 version!