seek-oss / serverless-haskell

Deploying Haskell applications to AWS Lambda with Serverless
MIT License
215 stars 22 forks source link

Support container images! #157

Open danwdart opened 3 years ago

danwdart commented 3 years ago

Now here's something that'll let us avoid the fpco/stack-build:lts-13.30 stuff, by using our own executables based on a smaller docker image.

https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/

koterpillar commented 3 years ago

That's nice, makes some cleanup possible. We'll likely need serverless to support this first though.

danwdart commented 3 years ago

I think there's an option where you upload it to ecs via aws-cli and then you specify without specifying the runtime or function name, and it runs the docker ENTRYPOINT.

koterpillar commented 3 years ago

This seems to be it: https://github.com/serverless/serverless/pull/8572. However, it expects the user to manage the ECS image themselves - if you just define a function it should, for example, leave no traces in your account after it's deleted. I hope some support for building the images is added to Serverless itself, then we can use that.

danwdart commented 3 years ago

Wait, isn't the first code block in this article demonstrating how to do the automatic building? https://www.serverless.com/blog/container-support-for-lambda

danwdart commented 3 years ago

Well yes, turns out that they do build now. https://github.com/serverless/serverless/blob/master/CHANGELOG.md#2200-2021-01-21 So I don't think this is blocked anymore.