aws-samples / aws-sam-swift

SAM Templates for Server-side Swift on AWS
MIT No Attribution
4 stars 1 forks source link

Redundant "create lambda bootstrap file" step in Makefile #8

Open mflint opened 1 month ago

mflint commented 1 month ago

This step in the makefile creates a symbolic link from the built lambda executable to /bootstrap...

# create lambda bootstrap file
docker run --rm -v $($@BUILD_DIR):/build-target -v `pwd`:/build-src -w /build-src swift-builder bash -cl "cd /build-target/lambda && ln -s $($@PRODUCT) /bootstrap"

But the rest of the makefile ignores the /bootstrap symbolic link, and instead copies the binary directly into the artifacts directory.

Do you really need that "docker run... ln -s" step?

dave-moser commented 6 hours ago

I have updated the projects to use Swift 6.0 and Swift Lambda Runtime v2. The code is also now compiled using the swift package archive plugin instead of the makefile.

Please let me know if that works for you.