docker-lambda icon indicating copy to clipboard operation
docker-lambda copied to clipboard

DOCKER_LAMBDA_STAY_OPEN via API

Open elthrasher opened this issue 5 years ago • 4 comments

First, thanks for this great project. The number one thing keeping from serverless has always been the tooling/dev experience and I feel like a lot of those problems are being solved.

DOCKER_LAMBDA_STAY_OPEN is a great feature for development, but looks like I still need to lambda invoke to call the method. Is there any way to connect with the api gateway provided by SAM? I couldn't figure it out.

My use case is that I work with teams that use a lot of docker-compose to run a handful of services for local development. I'd like to start introducing serverless to our workflows and in fact am considering wrapping a couple of these services in aws serverless express. It's pretty easy to use lambci and DOCKER_LAMBDA_STAY_OPEN to get a persistent container running one of our lambdas, but lambda invoke isn't going to give us that cohesive developer experience.

I couldn't find an api-to-lambda-invoke wrapper for local dev, so I wrote one and it works fine, but I'm not really looking to reinvent the wheel or take on the maintenance debt if there's already something out there I'm just not seeing. Can you point to any existing solutions/something I missed? If not I'd be happy to continue with my local gateway and share it.

elthrasher avatar Jan 26 '20 19:01 elthrasher

First, thanks for this great project. The number one thing keeping from serverless has always been the tooling/dev experience and I feel like a lot of those problems are being solved.

DOCKER_LAMBDA_STAY_OPEN is a great feature for development, but looks like I still need to lambda invoke to call the method. Is there any way to connect with the api gateway provided by SAM? I couldn't figure it out.

My use case is that I work with teams that use a lot of docker-compose to run a handful of services for local development. I'd like to start introducing serverless to our workflows and in fact am considering wrapping a couple of these services in aws serverless express. It's pretty easy to use lambci and DOCKER_LAMBDA_STAY_OPEN to get a persistent container running one of our lambdas, but lambda invoke isn't going to give us that cohesive developer experience.

I couldn't find an api-to-lambda-invoke wrapper for local dev, so I wrote one and it works fine, but I'm not really looking to reinvent the wheel or take on the maintenance debt if there's already something out there I'm just not seeing. Can you point to any existing solutions/something I missed? If not I'd be happy to continue with my local gateway and share it.

yeah, this is exactly what features i want

contributionls avatar Mar 19 '20 21:03 contributionls

I believe https://github.com/dherault/serverless-offline supports this now

mhart avatar Mar 19 '20 21:03 mhart

I came up with my own solution: https://github.com/elthrasher/http-lambda-invoker

elthrasher avatar Mar 23 '20 13:03 elthrasher

@elthrasher dude... you're a baddass. works like a charm and you wrote it in Go. rock on 🥇

tyliggity avatar Mar 28 '21 21:03 tyliggity