Lambda to RDS PG SSL Communication: handling AWS certificates rotation programmatically

0

AWS RDS rotates the certificates that require updating the client's trust store with a new CA certificate. What is the standard approach for updating CA certificate in the client application dynamically/programmatically without any manual intervention ensuring no impact on incoming traffic? Pls, note downloading the CA certificate should also happen programmatically.

I tried searching for this information on the AWS document but couldn't find it, everywhere it's mentioned to download the CA bundle manually (as the link may not be fixed) which may not be ideal for a production-grade setup.

3回答
0

For a Lambda, you should consider using an IAM role to allow access rather than Certificate. The certificate is better suited for clients.

profile pictureAWS
エキスパート
iBehr
回答済み 1年前
  • IAM role will not encrypt data in transit. We have a security requirement to enable SSL to secure data in transit therefore looking for an appropriate answer.

0

Certificates in lambda for mtls usually can be configured using lambda layers. Trust stores could be added to lambda layers in similar approach. Please refer to this sample if its useful for your case - https://github.com/aws-samples/serverless-mutual-tls/blob/main/README.md

AWS
回答済み 1年前
  • This explains the fundamental of SSL handshake. But the requirement here is how does client application be aware of RDS certificate has changed? how does client application download the server CA certificate programmatically.

0

AHA dashboard should be able to provide the scheduled account notifications w.r.t RDS cert rotation. A workaround could be to build automation around AHA notifications and subscribe for these events as mentioned in blog post architecture - https://aws.amazon.com/blogs/mt/aws-health-aware-customize-aws-health-alerts-for-organizational-and-personal-aws-accounts/ Once a Lambda is able to process the cert rotation operation from above architecture, downloading the new CA cert and updating the client application trust store could be done programmatically as provided in docs - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html#UsingWithRDS.SSL-certificate-rotation-sample-script Hope it helps.

AWS
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ