News for hackers. Stuff that matters.

breandr

Re:AWS Lambda – Best practices on Thursday March 02, 2017 @12:44PM (#13776252)
You need to specify your MIME type (most commonly, application/json) to be treated as binary (from console: API -> Binary Support). In your Lambda function: `callback(null, { body: base64EncodedBody, status: 200, headers: {}, isBase64Encoded: true })`
Hi Everhusk, I don't specifically call it out in the article, but the code is actually reusing database connections. As mentioned in other comments, the trick is to establish the connection outside of the handler so that the connection only happens once per container.
Check out our example on github https://github.com/awslabs/aws-serverless-express/tree/maste.... The lambda wrapper is very thin (4 LOC). So you have two options: run/test your express app locally as you always would, or use the provided `npm run local` command which simulates the API Gateway+Lambda part (you can modify the `api-gateway-event.json` to change the "request" from API Gateway). This is primarily an example and starting point, and there is much more you could do to improve this process.
Re:Contributing to Chromium: An Illustrated Guide on Saturday February 28, 2015 @10:25PM (#9125925)
Hello, this is certainly off-topic but I am curious about your username. Is it in reference to Waldorf schools? My daughter just started preschool at one and I'm wondering if "notwaldorf" is a shot at Waldorf schools. As a parent I would obviously love to know about any negative experiences.