Skip to content

cloudwatch_lambda_agent error using latest python images #355

@Morgadoooo

Description

@Morgadoooo

Hi — apologies if this is the wrong repo.

Since the latest AWS Lambda base images were published, we’re seeing repeated error logs inside our Lambdas:

[2025-11-25T23:11:17.882Z ERROR cloudwatch_lambda_agent::utilities::cgroupfs] 
Error while reading memory.stat for path /sys/fs/cgroup/memory/memory.stat: 
No such file or directory (os error 2)

This error appears with the newest image tags, but does not occur with older images such as:

  • public.ecr.aws/lambda/python:3.11.2025.11.22.10-x86_64 with
RUN curl -O https://lambda-insights-extension.s3-ap-northeast-1.amazonaws.com/amazon_linux/lambda-insights-extension.rpm && \
    rpm -U lambda-insights-extension.rpm && \
    rm -f lambda-insights-extension.rpm
  • public.ecr.aws/lambda/python:3.12.2025.11.22.10-x86_64 with
RUN curl -O https://lambda-insights-extension.s3-ap-northeast-1.amazonaws.com/amazon_linux/lambda-insights-extension.rpm && \
    rpm -U lambda-insights-extension.rpm && \
    rm -f lambda-insights-extension.rpm

Repro steps (what we did):

  • Pull latest image (e.g. public.ecr.aws/lambda/python:3.11) and run a simple Lambda that initializes the CloudWatch agent.

  • Observe repeated memory.stat read errors in the logs.

  • Repeat with the older image tag listed above — no such errors appear.

Expected behavior: no memory.stat read errors in normal Lambda container environment.

Actual behavior: repeated cloudwatch_lambda_agent::utilities::cgroupfs errors about missing /sys/fs/cgroup/memory/memory.stat.

Environment details:

  • Images tested: latest published Lambda base images (tags pushed recently)

  • Images that do not show the error: public.ecr.aws/lambda/python:3.11.2025.11.22.10-x86_64, public.ecr.aws/lambda/python:3.12.2025.11.22.10-x86_64

Thanks for any guidance — happy to provide more info or help debug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions