cloudandthings / terraform-aws-clickops-notifier

Get notified when actions are taken in the AWS Console.
https://registry.terraform.io/modules/cloudandthings/clickops-notifier/aws/latest
MIT License
209 stars 17 forks source link

Allow specifying the amount of memory for lambda function #35

Closed Rychard closed 1 year ago

Rychard commented 1 year ago

With only 128MB of memory allocated to the lambda, some invocations are failing. This seems to be a problem for accounts that generate large amounts of events, as the error is being thrown on the line where the gzipped log files are being read. (Well, when it tries to parse the contents of the log files as JSON, but you know what I mean)

[ERROR] MemoryError
Traceback (most recent call last):
  File "/var/task/main.py", line 146, in handler
    raise e
  File "/var/task/main.py", line 121, in handler
    event_json = json.load(fh)
  File "/var/lang/lib/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/var/lang/lib/python3.8/json/__init__.py", line 343, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
phzietsman commented 1 year ago

Thanks for the feedback! There is an open PR for this: https://github.com/cloudandthings/terraform-aws-clickops-notifier/pull/34.

github-actions[bot] commented 1 year ago

This issue has been resolved in version 1.6.0 :tada: