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.
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:
But you will get an unknown options error, because there is a blank in the AddressLine1 field. I wish the option can accept a file like @input.json, that will make it much easier, without worrying about quoting and JSON.
Finally, got email for verifying contact data:
This is an important email, and your prompt action is required. If you do not act on the instructions we are providing below, your domain name(s) will be suspended on 2016-12-31 12:00.
Why is this required? Beginning January 1st, 2014, ICANN requires that registrars verify that domain contacts can be reached.
What do you need to do? Please confirm that your email address firstname.lastname@example.org can be reached, by clicking on the link below:
We have successfully registered example.com. We also created a hosted zone for your domain. This hosted zone is where you store information about how to route traffic for your domain, for example, to an Amazon EC2 instance or a CloudFront distribution. To learn how to add resource record sets to your hosted zone, see Working with Resource Record Sets.
If you did not request this change, please contact Amazon Web Services Customer Support immediately.