Aurora Blue/Green デプロイメントは論理レプリケーションの事前有効化が必須
デフォルトパラメータグループのまま create-blue-green-deployment を実行すると、以下のエラーで失敗する。
SourceClusterNotSupportedFault: Blue/Green Deployments require a DB cluster
with logical replication enabled. Before you create a Blue/Green Deployment
for a DB cluster, associate the DB cluster with a custom DB cluster parameter
group that enables logical replication.カスタムパラメータグループを作成し、エンジンに応じたパラメータを設定する必要がある。
aws rds modify-db-cluster-parameter-group \
--db-cluster-parameter-group-name my-params \
--parameters "ParameterName=rds.logical_replication,ParameterValue=1,ApplyMethod=pending-reboot"aws rds modify-db-cluster-parameter-group \
--db-cluster-parameter-group-name my-params \
--parameters "ParameterName=binlog_format,ParameterValue=ROW,ApplyMethod=pending-reboot"ApplyMethod=pending-reboot なので、パラメータグループをクラスターに適用した後、全インスタンスの再起動が必要だ。describe-db-clusters で DBClusterParameterGroupStatus が in-sync になるまで待つ。pending-reboot のまま放置すると Blue/Green デプロイメントの作成が同じエラーで失敗する。
詳細は Aurora Blue/Green 実践検証シリーズ で検証した。
