dherault/serverless-offline

Support custom container images

Open

#1.324 geöffnet am 30. Jan. 2022

Auf GitHub ansehen
 (13 Kommentare) (13 Reaktionen) (0 zugewiesene Personen)JavaScript (792 Forks)batch import
featurehelp wanted

Repository-Metriken

Stars
 (5.072 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 11h) (6 gemergte PRs in 30 T)

Beschreibung

Feature Request

AWS Lambda and Serverless both now support Container images. https://www.serverless.com/blog/container-support-for-lambda https://docs.aws.amazon.com/lambda/latest/dg/images-create.html

This greatly improves testability and stability, since the exact image that is created and tested can be used at runtime.

It seems like it would require a small change to at least still run the python code.

Sample Code

  • file: serverless.yml

Current handler location string:

functions:
  api:
    handler: path/to/handler.api  # <------

Handler location string with custom containers:

functions:
  api:
    image:
      name: api
      command:
        - path/to/handler.api # <------

Expected behavior/code

Just hope for it to run the code as it does today, getting its location from either the previous handler key OR the new image.command array.

Contributor Guide