gkrizek / bash-lambda-layer

Run Bash scripts in AWS Lambda via Layers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS command throwing RUNTIME EXCEPTION

Gayatri31 opened this issue · comments

here is the Error:

Response:
{
  "errorMessage": "Exited with code 126",
  "errorType": "RuntimeErrorException",
  "stackTrace": "/var/task/hello.sh: /opt/bin/aws: /usr/bin/python3: bad interpreter: No such file or directory"
}

Request ID:
"2af276fe-d3f6-48e2-b4b6-3ae3fc8eb6ad"

Function logs:
START RequestId: 2af276fe-d3f6-48e2-b4b6-3ae3fc8eb6ad Version: $LATEST
hello

Code:

function handler () {
   
    set -e
    echo 'hello'
    EVENT_DATA=$1
    echo $EVENT_DATA
    aws s3 ls $(echo $EVENT_DATA | jq ."bucket")
}

Please Suggest me what are the steps to resolve this

i had the same one 'cuz i tried ami2 custom runtime, use ami1 one... and i've deleted "RUNTIME_PATH="2018-06-01/runtime" from the longer "bootstrap" example...

That might be added to README, is it worth preparing PR if it helps?