Signiant / aws-iam-slack-notifer

Notifies slack when an IAM policy is created, changed or assigned to a role
MIT License
33 stars 6 forks source link

aws-iam-slack-notifier not currently working? #3

Open CaseyLabs opened 5 years ago

CaseyLabs commented 5 years ago

Hi there, I really like the idea of this IAM notification, and have tried deploying it. Unfortunately though, it's not generating any Slack alerts.

The function was successfully created, and the Slack bot is all setup, it just looks like the Lambda function isn't being triggered when an IAM event occurs.

I realize this is a two year-old repo, but any help would be appreciated.

Thanks!

dnorth98 commented 5 years ago

Do you have cloudtrail enabled? You'll need to have it enabled so that IAM events are triggered....

CaseyLabs commented 5 years ago

Confirmed! Cloudtrail is enabled.

dnorth98 commented 5 years ago

OK, cool. Just looked into the template to remind myself and it looks like it's subscribing to events:

                "eventName": [
                  "CreatePolicy",
                  "CreatePolicyVersion",
                  "AttachUserPolicy",
                  "DetachUserPolicy",
                  "AttachRolePolicy",
                  "DetachRolePolicy",
                  "AttachGroupPolicy",
                  "DetachGroupPolicy"
                ]

Try one of those events and see if it shows up in Cloudtrail. You can also then go to cloudwatch->rules and see the rule. There's a link on it for metrics so you can see if the rule is being fired.

pstanton237 commented 4 years ago

I installed aws-iam-slack-notifier yesterday and confirmed that it works fine. The last update is years ago, but I can be sure that aws-iam-slack-notifier is still works.

If aws-iam-slack-notifier doesn't respond to any IAM events, I'd like to make sure that the AWS Region where you deployed CloudFormaion template is 'us-east-1'.