aws-lambda-layer-creator icon indicating copy to clipboard operation
aws-lambda-layer-creator copied to clipboard

Bad substitution issue

Open Gamatel opened this issue 1 year ago • 1 comments

Hello,

I encountered a Bad substitution error when trying to use the create-layer.sh script with the following command:

./create-layer.sh node20-fetch-S3-SDK nodejs20.x @aws-sdk/client-s3 node-fetch ./create-layer.sh: 7: Bad substitution

Gamatel avatar Feb 07 '24 12:02 Gamatel

The issue here is that the code asks to run any POSIX compliant shell #!/bin/sh but then uses non-POSIX compliant syntax. On ubuntu the shell used will be dash which does not support some of this syntax.

If you change the first line to #/bin/bash it will work fine.

dabiged avatar Jul 10 '25 02:07 dabiged