2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS SecretsManager マルチリージョンレプリケーションを試してみました。

Last updated at Posted at 2021-03-08

はじめに

開発/テスト/本番環境における、RDB接続情報などの環境依存パラメータをよりセキュアに保管運用できるSecretsManagerですが、マルチリージョンでのレプリケーションに対応したということなので、レプリケーション設定および変更した際の伝搬の様子を確認します。また、同時に複数リージョンへレプリカリージョンできるかも確認したいと思います。

参考記事

登録手順

  • 1.保存したいシークレットを選択
    image.png

  • 2.[シークレットを他のリージョンにレプリケート]
    image.png
    今回は、大阪リージョンと地球の裏側のサンパウロを選択。
    image.png

  • 3.登録完了
    secretsmanager.png

結果:aws cliでキーの値をUpdateしてみました

動画開始16秒後、左上コンソール画面で変更をプライマリ(東京リージョン)に変更を実行してます。その後、右側上下2つのレプリカ側に伝搬していっているのが確認できます。以上です。

動画中に使用しているaws cliコマンド

# valueを確認
aws secretsmanager get-secret-value --secret-id <<<ARN>>> --region <<<REGION_CODE>>>--query "{Name:Name,SecureString:SecretString,VersionId:VersionId,CreatedDate:CreatedDate}

# valueを変更
aws secretsmanager update-secret --secret-id <<<ARN>>> --secret-string '{"<<<KEYNAME>>>":"<<<STRING>>>"}'
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?