Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > RightScale Community Resources > RightScale OSS > Windows Route53 PowerShell Module

Windows Route53 PowerShell Module

Table of Contents
No headers

The Windows Install Route53 Tools script installs a PowerShell module in your instance that's discoverable via your PSModulePath. The PowerShell module is esentially a wrapper for the following Route53 API actions:

CreateHostedZone
ListHostedZones
DeleteHostedZone
GetHostedZone
ChangeResourceRecordSets
ListResourceRecordSets

And provides some helper cmdlets for each action:

Show-HostedZones
Remove-HostedZone
Show-ResourceRecords
New-ARecord
Remove-ARecord
Update-ARecord

 

Windows Update Route53 Record is a sample script that uses this module to update an A record hosted with Route53. The code sample below basically:

  1. Imports the Route53Tools module
  2. Sets the AWS keys to access your AWS Route53 account
  3. Calls the "Update-ARecord" cmd let to update your a record

 

Import-Module Route53Tools

[Route53Helper.Authentication]::AwsAccessKeyId = "$env:AWS_ACCESS_KEY_ID"
[Route53Helper.Authentication]::AwsSecretAccessKey= "$env:AWS_SECRET_ACCESS_KEY"

"Using IP Address: $env:DNS_RECORD_IP"

Update-ARecord  -domainName "$env:DOMAIN_NAME"`
                -type "A"`
                -ttl "$env:NEW_TTL"`
                -hostedZoneId "$env:HOSTED_ZONE_ID"`
                -comment "$env:COMMENT"`
                -newIP "$env:DNS_RECORD_IP"
You must to post a comment.
Last modified
23:36, 16 May 2013

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.