Q89 — AWS SAA-C03 Ch.17
Question 89 of 89 | ← Chapter 17
Q1389. A solutions architect has AWS Lambda functions that need to access a company's internal data science libraries and reference data. Separate teams manage the libraries and the data. The teams must be able to update and upload new data independently. The Lambda functions are connected to the company's central VPC.Which solution will provide the Lambda functions with access to the libraries and data?
- A. Attach an Amazon EBS volume to the Lambda functions by using EBS Multi-Attach in the central VPC.Update the Lambda function execution roles to give the functions access to the EBS volume. Update the Lambda function code to reference the files in the EBS volume.
- B. Compress the libraries and reference data in a Lambda/tmp folder. Update the Lambda function code to reference the files in the/tmp folder.
- C. Set up an Amazon EFS file system with mount targets in the central VPC. Configure the Lambda functions to mount the EFS file system. Update the Lambda function execution roles to give the functions access to the EFS file system. ✓
- D. Set up an Amazon FSx for Windows File Server file system with mount targets in the central VPC.Configure the Lambda functions to mount the Amazon FSx file system. Update the Lambda function execution roles to give the functions access to the Amazon FSx file system.
Correct Answer: C. Set up an Amazon EFS file system with mount targets in the central VPC. Configure the Lambda functions to mount the EFS file system. Update the Lambda function execution roles to give the functions access to the EFS file system.
Explanation
Let's analyze each option to determine the best solution for providing AWS Lambda functions with access to the company's internal data science libraries and reference data:Option A: Attach an Amazon EBS volume to the Lambda functions by using EBS Multi - Attach in the central VPC. Update the Lambda function execution roles to give the functions access to the EBS volume. Update the Lambda function code to reference the files in the EBS volume. Limitations of EBS with Lambda: Amazon EBS volumes are designed for use with Amazon EC2 instances and are not a native storage option for AWS Lambda. Although EBS Multi - Attach allows an EBS volume to be attached to multiple EC2 instances simultaneously, Lambda functions have a different execution model. Lambda functions are stateless and are invoked on - demand. There is no straightforward way to attach an EBS volume to a Lambda function, and it would not be a scalable or efficient solution. Additionally, managing the attachment and detachment of EBS volumes for Lambda invocations would be complex and error - prone. So, this option is not suitable. Option B: Compress the libraries and reference data in a Lambda/tmp folder. Update the Lambda function code to reference the files in the /tmp folder.Limited storage and lack of independent updates: The /tmp directory in a Lambda function has a limited storage capacity (up to 512 MB for some runtimes and can vary). For large data science libraries and reference data, this may not be sufficient. Moreover, if the libraries and data need to be updated independently by different teams, using the /tmp folder is not practical. Each time the data or libraries are updated, the Lambda function deployment package would need to be re - created and re - deployed, which is not an efficient way to manage independent updates. So, this option is not ideal. Option C: Set up an Amazon EFS file system with mount targets in the central VPC. Configure the Lambda functions to mount the EFS file system. Update the Lambda function execution roles to give the functions access to the EFS file system.Scalability and independent updates: Amazon Elastic File System (EFS) is a fully - managed, scalable, and shared file storage service that can be used with AWS Lambda. It provides a common file system that can be accessed by multiple Lambda functions simultaneously. Different teams can update and upload new data to the EFS file system independently without affecting the Lambda functions' operation. The Lambda functions can mount the EFS file system and access the libraries and data as if they were local files. Also, updating the execution role to grant access to the EFS file system is a straightforward process. This option meets the requirements of the scenario.Option D: Set up an Amazon FSx for Windows File Server file system with mount targets in the central VPC. Configure the Lambda functions to mount the Amazon FSx file system. Update the Lambda function execution roles to give the functions access to the Amazon FSx file system. Overkill and cost - inefficiency: Amazon FSx for Windows File Server is a fully - managed Windows file server that is designed for applications that require Windows - native file system features such as Active Directory integration, user quotas, and Distributed File System (DFS) namespaces. If the company's data science libraries and reference data do not specifically require these Windows - specific features, using Amazon FSx for Windows File Server would be an overkill. It is also generally more expensive than Amazon EFS. So, this option is not the most appropriate.Based on the above analysis, the solution that will provide the Lambda functions with access to the libraries and data is to set up an Amazon EFS file system with mount targets in the central VPC, configure the Lambda functions to mount the EFS file system, and update the Lambda function execution roles to give the functions access to the EFS file system.So the answer is C.