aws-samples / amazon-guardduty-to-slack

Demonstrates integrating Amazon GuardDuty with your Slack Channel
MIT No Attribution
132 stars 66 forks source link

Added new features, to map Account Numbers to Account Nicknames. #12

Closed thamizarasu closed 4 years ago

thamizarasu commented 5 years ago

Map Account Numbers to Account Nicknames and replace 4 spaces with 2 spaces to have the Lambda function zip file inside 4096 characters ranges.

Issue #, if available: None identified, as of now. Please report it in the repo, if you find anything.

Description of changes: When the GuardDuty alerts coming in Slack, we do see all AWS Account Number which is very raw to identify which account. So added a feature to have Account Nicknames, so you can easily identify which account is having issues.

Added a new Environment variable and please use that to pass your account number: account nickname values as keypair and comma separated. for eg "account number1: account nickname1, account number2: account nickname2".

This change also included some whitespaces cleanup (Find and replaced four whitespaces into two whitespaces on the indentation to solve the zip file limitation issues).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ryanholland commented 4 years ago

Adding an account name to number mapping doesn't scale well in a template. We will look to add this natively to the findings instead.