aws / aws/aws-lambda-roadmap

[Lambda] Function URLs: Binary response data support

Đang mở
#79 5 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
196
Fork
5
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) 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 or have submitted a pull request, please leave a comment

**Tell us about your request**

Enable Lambda Function URLs to return binary data (e.g., PDFs, images, Excel files) directly in HTTP responses.

**Which service(s) is this request for?**

AWS Lambda - Lambda Function URLs

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**

Building serverless web applications using Lambda Function URLs that need to serve binary content like PDF reports, Excel exports, and images. Lambda Function URLs cannot return binary data in responses - only text-based content is supported.

This forces unnecessary architectural complexity:
- Additional S3 bucket for temporary file storage
- Pre-signed URL generation and management
- Extra latency (write to S3 → generate URL → redirect client)
- Cleanup logic for temporary files
- Added costs for S3 PUT operations

API Gateway supports binary media types via `binaryMediaTypes` configuration, so this is technically feasible. Function URLs were positioned as a simpler alternative to API Gateway, but this limitation significantly reduces their utility.

**Are you currently working around this issue?**

Yes. We write binary content to an S3 "delivery bucket" and return a pre-signed URL with short expiration. The client follows this URL to download the file. This adds ~200-500ms latency, extra infrastructure, and operational overhead.

**Additional context**

- Base64 encoding works for small images but is impractical for larger files
- The existing 6MB payload limit would still apply - this is about content type, not size
- Common use case: serverless apps generating reports, exports, invoices

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Issue không xác định tệp repository, test hoặc điểm vào triển khai nào. Hãy bắt đầu bằng cách xem xét hành vi phản hồi của Lambda Function URLs và tài liệu tham chiếu binaryMediaTypes của API Gateway; được xem là hoàn tất khi Function URLs có thể trực tiếp trả về PDF, hình ảnh và các phản hồi nhị phân khác, đồng thời vẫn giữ giới hạn payload 6MB đã nêu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws
Lĩnh vực
api, cloud
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.