1

Image Configuration

I'm looking to add CMD override for an AWS Lambda via either terraform or docker. The lambda has type image since it is being run from a container. Trying to add the handler through terraform gives

Message_: "Please don't provide Handler or Runtime or Layer when the intended function PackageType is Image.",

Is there a way to set the _HANDLER to something and be used within the Dockerfile. CMD "${_HANDLER}"

Ie. $_HANDLER = $LAMBDA_HANDLER CMD ${_HANDLER} will then point to the lambda handler?

1 Answer 1

1

The image_config block allows you to override the command and entrypoint of the container. For example:

image_config {
  command = ["app.other_handler"]
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.