-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe your idea/feature/enhancement
SAM CLI should extract a path from the Handler property in SAM templates and use that as the CodeUri.
Other languages support this, so you could write:
Handler: "my/path/to/handler/app.handler"
Without a CodeUri and it will run fine.
While for Go you must always put the path to your source code in CodeUri:
CodeUri: "my/path/to/handler"
Handler: "mybinary" # this just refers to the compiled binary name, so it can be anything
Otherwise SAM CLI will fail to build.
Proposal
Add a special case for Go (or any other compiled language) to get the working directory from the Handler property before building. This gives flexibility in what both fields may refer to, i.e. CodeUri might refer to the location of the manifest file and Handler is the relative path to the lambda function.