I have an interesting problem with AWS Lambda and NodeJS SDK 2.6.x. I have a Lambda function created with the serverless framework and it appears that the bucket is idling out after 60 seconds if I don’t somehow keep it alive.
I have the usual code inits outside of the Lambda body function:
cluster = new couchbase.Cluster(
bucket = cluster.openBucket(bucketName)
If I make a query the first time using the Lambda and subsequent calls with less than 60 seconds then the bucket query will succeed just find… But if the Lambda is idle for more than 60 seconds, then the bucket query will fail and I will have wait about 2 seconds in the Lambda and try the query again (which will succeed the second time)
How do you keep the Lambda bucket alive. A Lambda container in AWS is typically up for about 15 minutes before it shuts down but the bucket is idling out in 60 seconds.
Has anyone run into this before?