aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.67k stars 1.01k forks source link

Error in chalice logs while running it on LocalStack inside docker container #2051

Open alloc7260 opened 1 year ago

alloc7260 commented 1 year ago

We are using chalice-local deploy to deploy our chalice app in LocalStack lambda running inside docker container.

It successfully deployed in LocalStack with no errors. lambda ARN also generated.

But our app is not running as it should be, so while debugging we found error in chalice logs by running it inside the docker contained at the app folder.

So the error says it doesn't found the config.json file which is inside the .chalice folder.

We have this file in our repo.

But the problem is the when deploying chalice does not copy the .chalice folder into docker container, i guess so the error occurred.

This is the full traceback screenshot of error (inside the container) :

docker logs

alloc7260 commented 1 year ago

@binarymatt @ogrodnek @garnaat @tomdyson

jaeyoung0509 commented 1 year ago

How is your package structured? I recommend checking if the package is set up as follows

├── README.md
├── __pycache__
├── app.py
├── chalicelib
├── .chalice
      ├── config.json
      ├── deployed
      ├── deployments
alloc7260 commented 1 year ago

@jaeyoung0509 Ya I already knew that, I have cloned a working repo https://github.com/Sam1320/GroupLang It has same structure that you gave, I want to test and debug it locally and I am using telegram for testing but as an alternative of aws I use localstack(docker). But after deploying the lambda function It can't able to run the app, and also produces errors.