Serverless: invoke local failed for python3.6 AWS Lambda

Created on 28 Apr 2017  ·  3Comments  ·  Source: serverless/serverless

This is a Bug Report

Description

From 18 April 2017 AWS Lambda has python3.6 https://aws.amazon.com/releasenotes/5198208415517126

  • What went wrong?
    I configured runtime: python3.6 in serverless.yml
    sls invoke local -f hello errored

  • What did you expect should have happened?
    sls deploy followed by sls invoke -f hello was successful

  • What was the config you used?

service: an-alexa-skill

provider:
  name: aws
  runtime: python3.6
  stage: dev
  region: eu-west-1

functions:
  hello:
    handler: handler.hello
    events:
      - alexaSkill

handler.py

import json

def hello(event, context):
    response = {
        'version': '1.0',
        'response': {
            'outputSpeech': {
                'type': 'PlainText',
                'text': 'Go Serverless v1.0! Your function executed successfully!',
            }
        }
    }
    return response
  • What stacktrace or error message from your provider did you see?
    > events.js:160
    > throw er; // Unhandled 'error' event
    > ^
    >
    > Error: spawn python3.6 ENOENT
    > at exports._errnoException (util.js:1007:11)
    > at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    > at onErrorNT (internal/child_process.js:348:16)
    > at _combinedTickCallback (internal/process/next_tick.js:74:11)
    > at process._tickDomainCallback (internal/process/next_tick.js:122:9)

Similar or dependent issues:
*

Additional Data

  • Serverless Framework Version you're using: 1.12.1
  • Operating System: Mac OS Sierra 10.12.4
  • Stack Trace:
  • Provider Error messages:
bug

Most helpful comment

@jnicho02 thanks for reporting.

Do you have Python 3.6 installed locally?

All 3 comments

@jnicho02 thanks for reporting.

Do you have Python 3.6 installed locally?

Ah...now I'm slightlyembarrassed. No. I will test and report back.

On Fri, 28 Apr 2017 10:54 Philipp Muens, notifications@github.com wrote:

@jnicho02 https://github.com/jnicho02 thanks for reporting.

Do you have Python 3.6 installed locally?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/serverless/serverless/issues/3535#issuecomment-297958022,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFFMznUz9_4tmSiZfS1NHF9s-rMdRlLks5r0bc1gaJpZM4NLIve
.

No worries @jnicho02! I ran into the exact same issue when I tested out the PR 😄

Was this page helpful?
0 / 5 - 0 ratings