Created
April 4, 2017 18:33
-
-
Save chrisblackwell/fd982462065b0d03ae054ba6500e7ef3 to your computer and use it in GitHub Desktop.
Create a Route53 domain entry using the AWS SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$s3 = Route53Client::factory(array( | |
'credentials' => [ | |
'key' => env('AWS_KEY'), | |
'secret' => env('AWS_SECRET'), | |
], | |
'region' => env('AWS_REGION'), | |
'version' => 'latest', | |
)); | |
$hostedZone = $s3->createHostedZone(array( | |
// Name is required | |
'Name' => 'domain.tld', | |
// CallerReference is required | |
'CallerReference' => 'domain-tld' . time(), | |
'HostedZoneConfig' => array( | |
'Comment' => 'Some useful comment', | |
), | |
'DelegationSetId' => getenv('ROUTE_53_DELEGATION'), | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment