Skip to content

kuritan/replace-unauthorized-ports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

What can we do with this function

replace aws's security group unauthorized ports

It's a AWS's lambda function to help management your security groups.
If there are ports which ingress 0.0.0.0/0, this function will replace it to your authorized ip, you know full automatic.

How to use it

  • enable AWS's config to monitoring EC2 resources
  • add a AWS's config rule which names VPC_SG_OPEN_ONLY_TO_AUTHORIZED_PORTS , it will evaluates your AWS resources(in there, Security Group)
  • create a remediation action names PublishSNSNotification
  • add s SNS topic to receive the notification

Create your own lambda function

code likes this repo.

Trigger it

set a SNS trigger to the lambda function you created before.
Absolutely, the topic is what you created before too.

Dont't forget environment variables

set a Environment variables to replace the 0.0.0.0/0 stuff.
like,
authorized_global_ipv4 8.8.8.8/32

About

replace aws's security group unauthorized ports

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages