Skip to content
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

Implement Lambda API InvokeWithResponseStream #1075

Closed
2 tasks
nakedible-p opened this issue Feb 26, 2024 · 7 comments
Closed
2 tasks

Implement Lambda API InvokeWithResponseStream #1075

nakedible-p opened this issue Feb 26, 2024 · 7 comments
Assignees
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@nakedible-p
Copy link

Describe the feature

Lambda currently supports response streaming, but that's used through a separate Invoke API call called InvokeWithResponseStream. https://docs.aws.amazon.com/lambda/latest/api/API_InvokeWithResponseStream.html

Currently there doesn't seem to be any support for this API in the Rust SDK, even though it's supported in the Java, Python and JavaScript SDKs.

Use Case

I need to call Lambda functions that will return more than 6 MB as a response by utilizing the response streaming feature.

Proposed Solution

Implement the API.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

A note for the community

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment
@nakedible-p nakedible-p added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 26, 2024
@jdisanti jdisanti added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Feb 26, 2024
@nakedible-p
Copy link
Author

The response is application/vnd.amazon.eventstream. Apparently this SDK already has some support for that stream type, but unfortunately it's specialized for the audio stream and not this InvokeWithResponseStream.

headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/vnd.amazon.eventstream".into())));

@jdisanti
Copy link
Contributor

jdisanti commented Feb 27, 2024

The code generator already supports event streams for APIs using the Smithy RestJson protocol, so I think this Lambda API would work. We just need to test it and add it to the allow list to let the code generator put it in the actual SDK.

@jdisanti jdisanti self-assigned this Feb 29, 2024
github-merge-queue bot pushed a commit to smithy-lang/smithy-rs that referenced this issue Mar 1, 2024
This PR enables event stream operations for the AWS `@restJson1` and
`@restXml` Smithy protocols. This will add the missing operations
reported in awslabs/aws-sdk-rust#1075 and
awslabs/aws-sdk-rust#1080.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
github-merge-queue bot pushed a commit to smithy-lang/smithy-rs that referenced this issue Mar 1, 2024
This PR enables event stream operations for the AWS `@restJson1` and
`@restXml` Smithy protocols. This will add the missing operations
reported in awslabs/aws-sdk-rust#1075 and
awslabs/aws-sdk-rust#1080.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
@gautamg795
Copy link

Hi, thanks for getting this implemented so quickly! How often do new releases get pushed to crates.io? We'd love to start using this change with Lambda ASAP. I tried to just add the repository as a Cargo dependency but found that the size of this repo makes fetches in CI extremely slow, so we'll wait for an official release to crates.io to get started.

@nakedible-p
Copy link
Author

I am not one of the devs, but looking at the release frequency, I doubt it's going to be terribly many days since this is already in pending release: https://github.com/awslabs/aws-sdk-rust/releases

@jdisanti
Copy link
Contributor

jdisanti commented Mar 6, 2024

It'll go out in one of the daily releases the next time we release smithy-rs, which should be pretty soon.

@jdisanti
Copy link
Contributor

This went out in yesterday's release.

Copy link

Comments on closed issues 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
Status: Done
Development

No branches or pull requests

3 participants