aws / aws/aws-lambda-go

Body of events.APIGatewayProxyRequest for Binary Data

Aperta
#331 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
3.8k
Fork
578
Merge medio
8h 18m
PR unite (30g)
1

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Iniziare con i campi body e IsBase64Encoded di events.APIGatewayProxyRequest, quindi riprodurre l’upload application/octet-stream di 280432 byte segnalato tramite l’integrazione proxy di AWS Lambda. Confrontare il body ricevuto e il flag con le impostazioni dei dati binari di API Gateway descritte nell’issue. Il lavoro è completato quando è documentato se il comportamento è previsto e sono state identificate la configurazione o la gestione necessarie per gli upload binari.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, go
Ambito
api, backend, cloud
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.