diff --git a/create.go b/create.go index 7d3ed41..877f1c4 100644 --- a/create.go +++ b/create.go @@ -40,6 +40,10 @@ func (app *App) prepareFunctionCodeForDeploy(opt DeployOption, fn *FunctionV2) e } // deploy docker image. no need to preprare log.Printf("[info] using docker image %s", *fn.Code.ImageUri) + + if fn.ImageConfig == nil { + fn.ImageConfig = &lambdav2types.ImageConfig{} // reset explicitly + } return nil } diff --git a/lambroll.go b/lambroll.go index bc646e9..32c170e 100644 --- a/lambroll.go +++ b/lambroll.go @@ -256,6 +256,15 @@ func newFunctionFromV2(c *lambdav2types.FunctionConfiguration, code *lambdav2typ Variables: e.Variables, } } + if i := c.ImageConfigResponse; i != nil { + if ic := i.ImageConfig; ic != nil { + fn.ImageConfig = &lambdav2types.ImageConfig{ + Command: i.ImageConfig.Command, + EntryPoint: i.ImageConfig.EntryPoint, + WorkingDirectory: i.ImageConfig.WorkingDirectory, + } + } + } for _, layer := range c.Layers { fn.Layers = append(fn.Layers, *layer.Arn) }