Relative Content

Tag Archive for flaskaws-lambdaaws-sam

AWS Lambda with SAM and Flask won’t serve binary static files

I have a MWE Amazon Lambda and Flask that serves static files in the static/ directory just fine, but it won’t serve binary files due to the binary restriction on the AWS Lambda API gateway. The way around this is that you are supposed to encode binary files as Base64. My static handler does that, but the AWS API is not turning the base64 encoded files back to binary.