import { APIGatewayEvent , Callback , Context , Handler } from 'aws-lambda' ; import { queueEvent } from './kinesis' ; export const queue = ( event , context , callback ? ) => { return queueEvent ( event . body ) . then ( ( { response , error } ) => { if ( error ) { callback && callback ( error ) ; } else { callback && callback ( null , response ) ; } } ) ; } ;