zappa / Zappa

Serverless Python
https://zappa.ws/zappa
MIT License
3.18k stars 359 forks source link

Upgrade from 0.58.0 to 0.59.0 removed access logs from cloudwatch #1336

Open elip-OE opened 1 month ago

elip-OE commented 1 month ago

Context

Hi there! I'm using zappa on a project for more than 3 years, so first of all thanks for your hard work! On my last deployment, I've upgraded zappa version from 0.58.0 to 0.59.0 (python 3.8/django 4.1.9/aws lambda), and form that time I stopped from see the access logs of the HTTP server in the aws cloudwatch logs

Expected Behavior

zappa tail STAGE should show access logs

Actual Behavior

zappa tail STAGE doesn't show access log, the access logs are not available in the AWS cloudwatch

Possible Fix

Steps to Reproduce

1. 2. 3.

Your Environment

thogerb commented 1 month ago

Hi. If helpful, I believe I experience this issue too. Upgraded requirements some days ago and discovered this morning my logs in Cloudwatch from the Zappa deployment were gone. What worked for me in the end: downgrading zappa 0.59 to 0.58 again.

Expected Behavior

When I set "log_level": "INFO" in zappa_settings, INFO log records are shown in CloudWatch for both 0.58.0 and 0.59.0

Actual Behavior

When I set "log_level": "INFO" no INFO log records are shown in CloudWatch when on 0.59.0 – but they do show on 0.58.0.

Your Environment

Zappa version used: 0.59.0 -> No INFO logs here, I did spot a WARNING log though Zappa version used: 0.58.0 -> INFO logs show as expected

Web service type: Django 4.2

Operating System and Python version: amazon/aws-lambda-python:3.8 docker

Your zappa_settings.json: These settings might be relevant, but note that I kept them consistent for the two version

        "log_level": "INFO",
        "cloudwatch_log_level": "INFO",

Downgrading fixed my problem for now, so just reporting if the extra context is helpful 👍

paulclarkaranz commented 1 week ago

1277 seems like the only logging related change in the diff in between versions. If no-one wants to dig into why this is happening perhaps that can be reverted to prevent more people pinning their zappa version?