0

I am trying to deploy a simple REST API using Chalice. My basic boilerplate is

from chalice import Chalice

app = Chalice(app_name='helloworld')


@app.route('/')
def index():
    return {'hello': 'world'}

When I call chalice local and run it on localhost 8000, there is no issue and I am able to get back the returns. However, after I deployed it and used the REST API URL that was returned, it didn't work anymore. I keep getting the

{"message": "Internal server error"}

I would appreciate any help! Thanks!

Nathan Lu
  • 69
  • 5
  • Might be API Gateway setting. https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-troubleshooting-lambda.html – shimo Aug 30 '21 at 00:20

1 Answers1

1
  1. Good news, it looks like you are reaching your lambda.
  2. Check aws cloudwatch logs: /aws/lambda/helloworld-{dev|prod}
  3. If can't solve it, upload .chalice/config.json and the error of the logs in clouwatch
albert
  • 4,290
  • 1
  • 21
  • 42