5
2

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 1 year has passed since last update.

CDK) RDSの認証局の有効期限対応

Last updated at Posted at 2023-09-12

TL;DR

  • aws-cdk-lib 2.94.0以降を利用する
  • caCertificate: rds.CaCertificate.RDS_CA_RDS4096_G1 を記述する
  • rds-ca-rsa4096-g1を指定した場合期限は100年後の2121年なので今回対応すれば今後は対応不要

経緯

  • RDSではデフォルトで認証局が設定されていて、最近までのデフォルトはrds-ca-2019となっている
  • AWSからrds-ca-2019は2024年で期限切れになると通知が来たので対応する(RDSの認証局の更新)
  • 9/2まではCDKで認証局を変更するのは工夫が必要だった(CDKに認証局を直接指定するプロパティがない。CFnにはある)(https://dev.classmethod.jp/articles/setting-rds-aurora-instance-ca-with-cdk/)
  • 9/2にリリースされたaws-cdk-lib 2.94.0で可能になった

記述

  "dependencies": {
    "aws-cdk-lib": "^2.94.0",
  ...
  }
import {
  ...
  aws_rds as rds,
  ...

...

      const rdsInstance = new rds.DatabaseInstance(this, `sample-rds-instance`,{
        ...
        caCertificate: rds.CaCertificate.RDS_CA_RDS4096_G1,
        ...
      });

cdk diffの出力

Resources
[~] AWS::RDS::DBInstance sample-rds-instance samplerdsinstanc012345678
 └─ [+] CACertificateIdentifier
     └─ rds-ca-rsa4096-g1

リファレンス

rds: support certificate autority certificate (#26883) (4fd510e), closes #26865

5
2
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
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?