aws / aws/aws-lambda-go

Body of events.APIGatewayProxyRequest for Binary Data

オープン
#331 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
3.8k
フォーク
578
平均マージ
8時間 18分
マージ済み PR(30日)
1

説明

Hi !

We're testing binary data upload to lambda handler in Golang, but found something strange.

From Settings of API Gateway, there is one type *application/octet-stream* to support any binary format. It's using **AWS Lambda proxy integrations**, so that it doesn't need to set **content handling**.

The size local file file is **280432**, once uploaded to lambda Golang handler, the size of **events.APIGatewayProxyRequest::body** becomes **509869**. By printing the data of body which is a string, it _looks_ like binary with \u0000, but the boolean value **events.APIGatewayProxyRequest::IsBase64Encoded** is always still **false**. In contrast, use openssl to encode the local file in base64, the size of output file is only **379755**, much smaller than body.

Is there any extra tips to handle binary data properly ? Thanks in advance.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

events.APIGatewayProxyRequest の body フィールドと IsBase64Encoded フィールドから始め、AWS Lambda プロキシ統合を通じて、報告された 280432 バイトの application/octet-stream アップロードを再現します。受信した body とフラグを、issue に記載されている API Gateway のバイナリデータ設定と比較します。完了条件は、その動作が想定どおりかどうかを文書化し、バイナリアップロードに必要な設定または処理を特定することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, go
領域
api, backend, cloud
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。