I'm trying to write an AWS Lambda function which uses Redis. When I run the code below:
'use strict' function handler (data, context, callback) { const redis = require("redis") const _ = require("lodash") console.log('before client') const client = redis.createClient({ url: 'redis://cache-url.euw1.cache.amazonaws.com:6379', }) console.log('after client') callback(null, {status: 'result'}) console.log('after callback') } exports.handler = handler
I have an answer like this:
{ "errorMessage": "2016-09-20T15:22:27.301Z 07d24e0b-7f46-11e6-85e9-e5f48906c0da Task timed out after 3.00 seconds" }
and logs look like:
which, IMHO, means that callback was called but nothing happened.
When I remove client's initialization I see proper response.
Any Ideas?