dherault/serverless-offline

Support custom container images

開放

#1,324 建立於 2022年1月30日

 (13 則留言) (13 個反應) (0 位負責人)JavaScript (792 個分叉)batch import
featurehelp wanted

倉庫指標

星標
 (5,072 顆星)
PR 合併指標
 (平均合併 1天 11小時) (30 天內合併 6 個 PR)

描述

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.

貢獻者指南