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.

Vaibhav
已提问 1 年前899 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则