bash-lambda-layer icon indicating copy to clipboard operation
bash-lambda-layer copied to clipboard

AWS command throwing RUNTIME EXCEPTION

Open Gayatri31 opened this issue 5 years ago • 2 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

Gayatri31 avatar Aug 17 '20 14:08 Gayatri31

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...

  • try this one : https://github.com/cloudshiftstrategies/lambda_bash

andrei-ka avatar Dec 07 '20 22:12 andrei-ka

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

uzzer avatar Sep 07 '21 07:09 uzzer