Skip to content

Instantly share code, notes, and snippets.


Michael Marner MichaelMarner

View GitHub Profile
MichaelMarner / lambda.ts
Last active Nov 3, 2017
Lambda image resize APIGateway
View lambda.ts
import { APIGatewayEvent, Context, Callback } from 'aws-lambda';
import * as Jimp from 'jimp';
export async function resize(
event: APIGatewayEvent,
context: Context,
callback: Callback
) {
const image = await;
await image.cover(Number(event.queryStringParameters.w), Number(event.queryStringParameters.h));