DEV Community

Discussion on: A Lesson Learned In Going Serverless

Collapse
 
seraphicrav profile image
Ravaka Razafimanantsoa

Hi !

I think the problem was that in AWS API Gateway, you need to activate the handling of binary types (Binary Media types) manually and then redeploy your API (do not remember exactly where is setting is). If is is not done, your binary data get corrupted.

Bonus story: One other thing I met when sharing my bucket with other IAM users was that I did not put ACL and ended up not being able to access the data in the bucket and not being able to remove them (even though I am the bucket owner). Adding the ACL bucket-owner-full-control granted me all the rights I needed on these files. But I don't think you will meet this problem with Lambda or Pre signed links.

Collapse
 
mhausenblas profile image
Michael Hausenblas

Thanks for the suggestion! If you look at the SO question I linked to in the post, that was indeed one of the things I tried (without success). Or maybe you mean something else?

Collapse
 
seraphicrav profile image
Ravaka Razafimanantsoa • Edited

More like this: docs.aws.amazon.com/apigateway/lat...

To be more precise, the passthrough thing as convert can imply messing up with you data.