Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] Adding auto alarm tags to lambda functions #26

Open
jbuiles1 opened this issue Oct 21, 2022 · 3 comments
Open

[ERROR] Adding auto alarm tags to lambda functions #26

jbuiles1 opened this issue Oct 21, 2022 · 3 comments

Comments

@jbuiles1
Copy link

Hello,

When trying to add a tag to a lambda function so that alarms will be created for the lambda function, the alarms are never created. Upon further investigation this error shows up in the cloudwatch logs.

[ERROR] TypeError: create_alarm() takes 9 positional arguments but 10 were given
Traceback (most recent call last):
  File "/var/task/cw_auto_alarms.py", line 155, in lambda_handler
    process_lambda_alarms(function, tags, create_alarm_tag, default_alarms, sns_topic_arn, alarm_separator, alarm_identifier)
  File "/var/task/actions.py", line 112, in process_lambda_alarms
    create_alarm(AlarmName, MetricName, ComparisonOperator, Period, tag['Value'], Statistic, Namespace,

The solution works perfectly fine with EC2 Instances however adding the tag on lambda functions does not seem to work. Is anyone able to use this solution to add alarms to lambda functions as well?

@kzuki1337
Copy link

Hi,

I have not been able to reach that far as of now. I have tagged the lambda with the ALARM_TAG. Then ran the lambda function, but no alarm was created.

Can you please guide me, how to create the alarms for lambda functions and test them without running the actual lamdba functions

@Castern
Copy link

Castern commented Jun 27, 2023

I am facing the same issue. After deploying, I tagged one of my lambda functions with the ALARM_TAG however no alarm was generated.

@Castern
Copy link

Castern commented Jun 28, 2023

I reached out to @knizami and added the tag with the key Create_Auto_Alarms to the lambda in question. The key does not need any value. This worked for me. I am not sure if that was intended to convey by the README or I was mistaken with the language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants