Skip to content

Instantly share code, notes, and snippets.

@Jlaird
Created March 24, 2020 20:28
Show Gist options
  • Save Jlaird/2ab1f123021e7b0aa27d55780bf57e11 to your computer and use it in GitHub Desktop.
Save Jlaird/2ab1f123021e7b0aa27d55780bf57e11 to your computer and use it in GitHub Desktop.
const AWS = require('aws-sdk');
const minimist = require('minimist');
const args = minimist(process.argv.slice(2));
require('dotenv').config();
const route53domains = new AWS.Route53Domains({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
region: 'us-east-1',
});
const params = {
DomainName: `${args.domain}`, /* required */
AdminContact: {
AddressLine1: '331 54th Ave N.',
City: 'Nashville',
ContactType: 'COMPANY',
CountryCode: 'US',
Email: 'dns@endeavorb2b.com',
FirstName: 'Jeremy',
LastName: 'Laird',
OrganizationName: 'Endeavor Business Media, LLC',
PhoneNumber: '8005477377',
State: 'Tennessee',
ZipCode: '37209'
},
RegistrantContact: {
AddressLine1: '331 54th Ave N.',
City: 'Nashville',
ContactType: 'COMPANY',
CountryCode: 'US',
Email: 'dns@endeavorb2b.com',
FirstName: 'Jeremy',
LastName: 'Laird',
OrganizationName: 'Endeavor Business Media, LLC',
PhoneNumber: '8005477377',
State: 'Tennessee',
ZipCode: '37209'
},
TechContact: {
AddressLine1: '331 54th Ave N.',
City: 'Nashville',
ContactType: 'COMPANY',
CountryCode: 'US',
Email: 'dns@endeavorb2b.com',
FirstName: 'Jeremy',
LastName: 'Laird',
OrganizationName: 'Endeavor Business Media, LLC',
PhoneNumber: '8005477377',
State: 'Tennessee',
ZipCode: '37209'
}
};
route53domains.updateDomainContact(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment