DVA-C02 practice question 29 of 35

A company uses a custom root certificate authority certificate chain (Root CA Cert) that is 10 KB in size generate SSL certificates for its…

Full set: 598 questions

Domain Troubleshooting and Optimization

A company uses a custom root certificate authority certificate chain (Root CA Cert) that is 10 KB in size generate SSL certificates for its on-premises HTTPS endpoints. One of the company’s cloud based applications has hundreds of AWS Lambda functions that pull date from these endpoints. A developer updated the trust store of the Lambda execution environment to use the Root CA Cert when the Lambda execution environment is initialized. The developer bundled the Root CA Cert as a text file in the Lambdas deployment bundle. After 3 months of development the root CA Cert is no longer valid and must be updated. The developer needs a more efficient solution to update the Root CA Cert for all deployed Lambda functions. The solution must not include rebuilding or updating all Lambda functions that use the Root CA Cert. The solution must also work for all development, testing and production environment. Each environment is managed in a separate AWS account. When combination of steps Would the developer take to meet these environments MOST cost- effectively? (Select TWO)
Answer options
A: Store the Root CA Cert as a secret in AWS Secrets Manager. Create a resource-based policy. Add IAM users to allow access to the secret
B: Store the Root CA Cert as a Secure Sting parameter in aws Systems Manager Parameter Store Create a resource-based policy. Add IAM users to allow access to the policy.
C: Store the Root CA Cert in an Amazon S3 bucket. Create a resource- based policy to allow access to the bucket. Correct answer
D: Refactor the Lambda code to load the Root CA Cert from the Root CA Certs location. Modify the runtime trust store inside the Lambda function handler.
E: Refactor the Lambda code to load the Root CA Cert from the Root CA Cert's location. Modify the runtime trust store outside the Lambda function handler. Correct answer
Correct Answer:
C. Store the Root CA Cert in an Amazon S3 bucket. Create a resource- based policy to allow access to the bucket.; E. Refactor the Lambda code to load the Root CA Cert from the Root CA Cert's location. Modify the runtime trust store outside the Lambda function handler.
Explanation

The most cost-effective and efficient solution involves two key steps. First, the root CA certificate must be stored in a centralized, accessible, and low-cost location. Amazon S3 is the ideal choice as it is highly cost-effective for storing a single small file and provides robust cross-account access capabilities through resource-based bucket policies. This addresses the multi-account requirement and allows the certificate to be updated in one place without redeploying any functions. Second, the Lambda functions must be refactored to fetch this certificate and update the runtime's trust store. To optimize performance, this logic should be placed outside the main function handler. This ensures the certificate is downloaded and the trust store is modified only once during the initialization of the execution environment (a "cold start"), and the configuration is reused for subsequent invocations.

Why Incorrect

A. Secrets Manager is more expensive than S3 for this use case. While functional, it is not the most cost-effective solution as required by the question.
B. AWS Systems Manager Parameter Store has a maximum size limit of 8 KB for Advanced parameters, which is too small for the 10 KB certificate file, making this option technically infeasible.
D. Modifying the trust store inside the function handler is inefficient, as it would execute on every invocation, adding unnecessary latency and cost compared to initialization-phase logic.

References

1. AWS Systems Manager User Guide

Parameter Store quotas: "Maximum size of a parameter value: Standard parameters: 4 KB. Advanced parameters: 8 KB." This confirms that the 10 KB certificate cannot be stored in Parameter Store.

2. AWS Lambda Developer Guide

Using Lambda with other services: "We recommend that you create Amazon S3 clients and other service clients outside of the scope of your handler function. This allows Lambda to reuse the connection over multiple invocations of your function." This principle of initializing resources outside the handler applies to setting up the trust store as well for performance reasons. (Found under language-specific sections

e.g.

"Managing connections for Node.js functions").

3. Amazon S3 User Guide

Using bucket policies: "A bucket policy is a resource-based AWS Identity and Access Management (IAM) policy... You can use a bucket policy to grant permissions to other AWS accounts or to IAM users in other accounts." This document details how to configure the required cross-account access.

4. AWS Security Blog

"How to manage a private CA for your AWS Lambda functions": This official blog post outlines a similar pattern

stating: "To make the CA certificate available to your Lambda function

you can either bundle it with your function’s deployment package or you can store it in a central location

such as an Amazon Simple Storage Service (Amazon S3) bucket... Storing the CA certificate in a central location like an S3 bucket makes it easier to manage and rotate the certificate." This validates using S3 as a central location.

Scroll to Top