Metadata property to the function that you want to build in a custom way:
Makefile add a command named as the function resource is prefixed by "build-":
NITRO_PRESET=node npx nuxt build
cp -r .output/ $(ARTIFACTS_DIR)/.output/
cp lambda.js $(ARTIFACTS_DIR)/lambda.js
ARTIFACTS_DIR directory is managed by SAM, the code will be moved to a temporary position (under
/tmp or inside a docker container), Make file command will be executed. SAM expect you copy release files into
ARTIFACTS_DIR, then compressed as ZIP archive and used as Lambda source code artifact.
Originally written on Mar 2, 2023.