dherault/serverless-offline

Support custom container images

Open

#1 324 ouverte le 30 janv. 2022

Voir sur GitHub
 (13 commentaires) (13 réactions) (0 assignés)JavaScript (792 forks)batch import
featurehelp wanted

Métriques du dépôt

Stars
 (5 072 stars)
Métriques de merge PR
 (Merge moyen 1j 11h) (6 PRs mergées en 30 j)

Description

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.

Guide contributeur