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
질문됨 일 년 전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
답변함 일 년 전
  • 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
답변함 일 년 전
  • 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
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠