Registering a Domain with Amazon Route 53 via CLI
Register a domain with Amazon Route 53 via CLI is very straightforward, the only complicate thing is to generate the acceptable JSON structure, then somehow enter the JSON string in the command line without meddling from the shell.
The command is:
|
|
The documentation can be found from the AWS CLI Command Reference or issuing:
|
|
Most the command line options require simple string values, but some options like --admin-contact
requires a structure data, which is complex to enter in the command line. The easiest way is to forget all other options and use --cli-input-json
to get everything in JSON.
First let’s generate the skeleton or template to use:
|
|
That should output something like:
|
|
Fill in the fields, leave out the ones not needed:
|
|
Now let’s register by running through jq to clean up extra blanks and end of line characters, and then pipe to xargs
command by using new line character as the delimiter instead of a blank by default:
|
|