-
Notifications
You must be signed in to change notification settings - Fork 256
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
make deploy works but the lambda function doesn't #3
Comments
@kqdtran i think only cloudwatch alarm notifications are supported, not events from logs |
@kqdtran Are you saying there was a failed Cloudwatch event and you saw that error in the logs? Where was the event from? Sorry on the README, I'll get that updated today |
No prob on the README, thanks for working on it! Yes, there are lots of Cloudwatch events and we are currently not receiving any notification on Slack (we are via email, however.) What's the best course of action to test that things work after running If it makes any difference, our instances and RDS db are all in a VPC. Do we need to specify the VPC config for this lambda function? |
It's likely failing on a call like this:
It would help to get the event json (or the shape) if at all possible. I'll run through some tests on this in our infra and see if I can come up with anything. |
I'm not sure if this is what you're looking for, but here's the json of an event we recently got an email for.
Thanks again for looking into it! Let me know if/how I can be more helpful. |
I'm still having trouble getting this to work. If it makes any difference, our instances and RDS db live inside a VPC. Do we need to specify the VPC configurations for the lambda function to make this work? |
The problem I see so far is that the event you posted doesn't appear to be the full event (it doesn't even mention the metric): Here's what a CloudWatch notification looks like in our test data:
When I check out our teams Lambda logs in cloudwatch, I see events like this:
|
To my knowledge, you don't need any special VPC settings. You might double check your IAM lambda_exec_role to ensure it can execute the function and has no other problems. |
Hey @CodyReichert and the Assertible team, thanks again for this very useful module. I'm having some problem getting it to work. I've changed the settings in the Makefile:
and also in the
config.js
:(the rest of the settings in
config.js
are left unchanged.)I then run
npm install
andmake test
, and it works perfectly. The four sample notifications were posted to our slack channel. Yay!Since the current version of the README ends here, I played around and figured that I needed to run
make deploy
to use this in production (I also added theAWS_ACCESS_KEY_ID
andAWS_ACCESS_KEY_SECRET
while doing this). So I ran this, and it worked great as well.All look good. I wait for a bit but receives no notification on the Slack channel, so I decide to check the AWS Lambda page on the console. I then choose Test => Configure test event => Cloudwatch logs in the sample event template. The test result looks like:
, which indicates that there's some bug with the module (I don't know nodejs, just purely guessing), or that I'm doing something wrong and the notification is not being posted correctly.
Any suggestion would be greatly appreciated, thanks!
The text was updated successfully, but these errors were encountered: