Open areeves87 opened 2 years ago
https://gist.github.com/RogerWebb/99e93ae29bbe36e612ed9da62c62e54f
I made a deployer of my own using the "chalice package" function and modifying it's output to deploy the project as a Docker Image. Feel free to make use of it, and let me know if you end up polishing it up any and want to share back. It's a rough draft, but it works (on my machine, of course, lol)
related #1598
I would like to see an enhancement to the
chalice package
command which supports configuring image-based lambdas. Something likechalice package --use-containers
.I am aware that the
package
command supports--merge-templates
which would allow us to override zip-based lambda fields with image-based lamda fields in theAWS::Serverless::Function
section if you include the appropriate json snippet. But that still leaves creating the Dockerfile for the build/testing process. So ideally the--use-containers
command would write out an image-based SAM template and a Dockerfile to build, test, and deploy the packaged lambda.The logic for writing out the sam template could have logic similar to this comment I made to demo POC https://github.com/aws/chalice/issues/1598#issuecomment-917511355
Note that I am trying to limit the scope of this feature request to just the packaging command so that SAM can be leveraged for resource management (ECR, build/test, etc). Other work could handle implementation for a similar
chalice deploy --use-containers
command.