Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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()
  • Zappa version used: 0.46.1
  • Operating System and Python version: Windows 7, Python 3.6

Can someone please help me out here?

like image 404
s_om Avatar asked Jun 19 '18 22:06

s_om


2 Answers

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.

like image 140
Aman Agarwal Avatar answered Oct 24 '22 01:10

Aman Agarwal


This github issue seems to have the same symptoms. Downgrading to zappa==0.45.1 solved it for me

like image 2
zsoobhan Avatar answered Oct 24 '22 00:10

zsoobhan