Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Have your AWS instance automatically add and remove itself from Route53 on startup and boot.

Notifications You must be signed in to change notification settings

Interencheres/dynamicroute53

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Route53 Puppet Module adds the ability for an Amazon EC2 instance to add itself to Route53 DNS when it boots, as well as remove itself when it is shut down.

It's DNS name is defined by the 'Name' tag set on the instance.

It has the ability to both work with private DNS as well as public - simply by adjusting the private_dns parameter in the class.

When private_dns is specified it will add an A record with it's internal IP as the value, if it is not specified it will default to public DNS and will add it's public hostname as a CNAME record.

The package installs official Amazon packages only: cloud-utils system package provided by Amazon, as well as awscli pip Python package also provided by Amazon.

The script currently does not have any fault tollerance - so ensure all variables are defined properly both in the class as well in Amazon.

The following IAM policies should be created - we recommend creating a separate user for security reasons:

Ability to describe tags:

{
  "Statement": [
    {
      "Sid": "Stmt1358183399710",
      "Action": [
        "ec2:DescribeTags"
      ],
      "Effect": "Allow",
      "Resource": [
        "*"
      ]
    }
  ]
}

Ability to edit your Route53 Hosted Zone Be sure to replace YOUR_HOSTED_ZONE_ID_HERE with your Hosted Zone ID

{
   "Statement":[
      {
         "Action":[
            "route53:ChangeResourceRecordSets",
            "route53:GetHostedZone",
            "route53:ListResourceRecordSets"
         ],
         "Effect":"Allow",
         "Resource":[
            "arn:aws:route53:::hostedzone/YOUR_HOSTED_ZONE_ID_HERE"
         ]
      },
      {
         "Action":[
            "route53:ListHostedZones"
         ],
         "Effect":"Allow",
         "Resource":[
            "*"
         ]
      }
   ]
}

About

Have your AWS instance automatically add and remove itself from Route53 on startup and boot.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 42.3%
  • Shell 34.8%
  • Puppet 22.9%