A developer is creating an AWS Lambda function in VPC mode. An Amazon S3 event will invoke the Lambda function when an object is uploaded into an S3 bucket. The Lambda function will process the object and produce some analytic results that will be recorded into a file. Each processed object will also generate a log entry that will be recorded into a file.
Other Lambda functions, AWS services, and on-premises resources must have access to the result files and log file. Each log entry must also be appended to the same shared log file. The developer needs a solution that can share files and append results into an existing file.
Which solution should the developer use to meet these requirements?
- Create an Amazon Elastic File System (Amazon EFS) file system. Mount the EFS
file system in Lambda. Store the result files and log file in the mount point. Append the log entries to the log file. - Create an Amazon Elastic Block Store (Amazon EBS) Multi-Attach enabled volume. Attach the EBS volume to all Lambda functions. Update the Lambda function code to download the log file, append the log entries, and upload the modified log file to Amazon EBS.
- Create a reference to the /tmp local directory. Store the result files and log file by using the directory reference. Append the log entry to the log file.
- Create a reference to the /opt storage directory. Store the result files and log file by using the directory reference. Append the log entry to the log file.
Reveal Solution Next Question