rr3tt / rumbda

Run ruby scripts on aws lambda.
MIT License
105 stars 18 forks source link

Permission denied #2

Closed frese closed 7 years ago

frese commented 7 years ago

Hi Kleaver

I've tried your packaging of Ruby on lambda, but get an error (see below) when executing my lambda, if I have been building on travis ? When building on my laptop (MacOS) and uploading the zip file, all is good !

Do you have any idea why ?

{
  "errorMessage": "Command failed: ./ruby_wrapper '{\"configRuleId\":\"config-rule-0123456\",\"version\":\"1.0\",\"configRuleName\":\"periodic-config-rule\",\"configRuleArn\":\"arn:aws:config:us-east-1:012345678912:config-rule/config-rule-0123456\",\"invokingEvent\":\"{\\\"awsAccountId\\\":\\\"012345678912\\\",\\\"notificationCreationTime\\\":\\\"1970-01-01T00:00:00.0Z\\\",\\\"messageType\\\":\\\"ScheduledNotification\\\",\\\"recordVersion\\\":\\\"1.0\\\"}\",\"resultToken\":\"myResultToken\",\"eventLeftScope\":false,\"ruleParameters\":\"{\\\"myParameterKey\\\":\\\"myParameterValue\\\"}\",\"executionRoleArn\":\"arn:aws:iam::012345678912:role/config-role\",\"accountId\":\"012345678912\"}'\n/bin/sh: ./ruby_wrapper: Permission denied\n",
  "errorType": "Error",
  "stackTrace": [
    "/bin/sh: ./ruby_wrapper: Permission denied",
    "",
    "ChildProcess.exithandler (child_process.js:204:12)",
    "emitTwo (events.js:106:13)",
    "ChildProcess.emit (events.js:191:7)",
    "maybeClose (internal/child_process.js:886:16)",
    "Socket.<anonymous> (internal/child_process.js:342:11)",
    "emitOne (events.js:96:13)",
    "Socket.emit (events.js:188:7)",
    "Pipe._handle.close [as _onclose] (net.js:501:12)"
  ]
}

Atm. my ruby code is a very simple "hello world"

Great work btw :-)

br Allan

rr3tt commented 7 years ago

Hmm, I'm not sure about that. It looks like file permissions on ruby_wrapper aren't being set correctly. You may try to compare the file permissions after building on mac and then on travis and see if there's a discrepancy

frese commented 7 years ago

Hi Garrett

You're probably right, I haven't had time to investigate further and have for other reasons chosen to do my job using something else than Lambda ! I will however, in the near future, use your rumbda program for other projects, and can figure it out at that time !

Thanks -Allan

On 6 Jun 2017, 17.28 +0200, Garrett Kliewer notifications@github.com, wrote:

Hmm, I'm not sure about that. It looks like file permissions on ruby_wrapper aren't being set correctly. You may try to compare the file permissions after building on mac and then on travis and see if there's a discrepancy — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.