Skip to content

About

Simple Lambda funtion to update a Security Group using a DDNS IP

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Update EC2 Security Groups using dynamic DNS IP

Simple Lambda funtion to update a Security Group using a DDNS IP. Useful if you need to update your security group(s) often because of clients using dynamic IPs being used to access your instance.

IAM Policy

This is the policy that grants the permissions to modify EC2 security groups and write logs, register it in IAM and create / apply to the role used to execute the function:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:PutLogEvents"
      ],
      "Resource": "arn:aws:logs:*:*:*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeSecurityGroups",
        "ec2:AuthorizeSecurityGroupIngress",
        "ec2:RevokeSecurityGroupIngress"
      ],
      "Resource": "*"
    }
  ]
}

Usage

Tag the rules of the security group using the description DDNS_Update. Modify the script to use the appropriate dynamic domain and security group id.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Made with ❤️ by Oddbytes.

About

Simple Lambda funtion to update a Security Group using a DDNS IP

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages