2020-12-27

Rote53 ホストゾーンの NS レコード

これで 12 月だいぶ躓いたので書いとくわ。思い出じゃ。

NS レコードは Simple Routing しかサポートしてへん。まずそれは AWS Management Console でわかる。 これを AWSPowerShell のパラメータでどうやんのかがわからんかった。ワタシが阿呆やからに違いない。

はまったところ。

change-resource-record-sets — AWS CLI 1.18.203 Command Reference

SetIdentifier -> (string)

Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A. In a group of resource record sets that have the same name and type, the value of SetIdentifier must be unique for each resource record set.

For information about routing policies, see Choosing a Routing Policy in the Amazon Route 53 Developer Guide .

Alias レコードのパラメータからコピペしてたのでSetIdentifierを残したままにしてしまっていた。NS レコードは Simple Routing のみを許可するのでエラーになるのね。↓

  52 |  Edit-R53ResourceRecordSet -HostedZoneId $ParentHostedZone.Id -ChangeB
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Invalid request: Expected exactly one of [Weight, Region, Failover, GeoLocation, or MultiValueAnswer], but found none in Change with [Action=CREATE, Name=test.testtest.com, Type=NS, SetIdentifier=nandeyanen]

わかりにくぅ!

おわり 😭