pythonamazon-web-servicesaws-lambdazappaflask-ask

Zappa deployment error : GET request yields 502 response code


I am trying to deploy the first zappa example app built with Flask-Ask, It looks like everything works good but after the Deploying API statement I get the following error :

Error: Warning! Status check on the deployed lambda failed. A GET request to '/' yielded a 502 response code.

Here is the code I am executing with minor changes to the sample app

from flask import Flask
from flask_ask import Ask, question, statement, session
import pyodbc

app = Flask(name)
ask = Ask(app, '/')

@ask.intent('HelloIntent')
def hello(firstname):
speech_text = "Hello %s" % firstname
return statement(speech_text).simple_card('Hello', speech_text)

@ask.intent('ByeIntent')
def bye():
return statement("Ok, goodBye!")



if name == 'main':
app.run()

Can someone please help me out here?


Solution

  • try installing all the dependencies using pip in the virtual environment where you are using zappa. It worked in my case.

    You can also use zappa tail command to see your logs.