exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 44 discussion

A developer is designing a serverless application with two AWS Lambda functions to process photos. One Lambda function stores objects in an Amazon S3 bucket and stores the associated metadata in an Amazon DynamoDB table. The other Lambda function fetches the objects from the S3 bucket by using the metadata from the DynamoDB table. Both Lambda functions use the same Python library to perform complex computations and are approaching the quota for the maximum size of zipped deployment packages.
What should the developer do to reduce the size of the Lambda deployment packages with the LEAST operational overhead?

  • A. Package each Python library in its own .zip file archive. Deploy each Lambda function with its own copy of the library.
  • B. Create a Lambda layer with the required Python library. Use the Lambda layer in both Lambda functions.
  • C. Combine the two Lambda functions into one Lambda function. Deploy the Lambda function as a single .zip file archive.
  • D. Download the Python library to an S3 bucket. Program the Lambda functions to reference the object URLs.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ponyi
Highly Voted 12 months ago
Whenever you see "to make deployment package smaller" -----> Layers
upvoted 13 times
...
Untamables
Highly Voted 1 year, 7 months ago
Selected Answer: B
B https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html
upvoted 13 times
...
sumanshu
Most Recent 4 months ago
Selected Answer: B
A) Eliminated - This approach would increase operational overhead because it requires packaging and maintaining duplicate libraries for each function. B) Correct - A Lambda layer is a shared resource containing code or data that can be used by multiple Lambda functions. It reduces the size of individual deployment packages by offloading the library into a shared layer. C) Eliminated - Combining the two functions increases code complexity D) Eliminated - Each Lambda invocation would need to download the library, increasing cold-start time.
upvoted 1 times
...
65703c1
5 months, 1 week ago
Selected Answer: B
B is the correct answer.
upvoted 1 times
...
Mtho96
1 year, 3 months ago
B creating a Lambda layer with the required Python library and using it in both Lambda functions, is the most suitable solution for reducing the size of the deployment packages with minimal operational overhead. https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html
upvoted 6 times
...
Baba_Eni
1 year, 4 months ago
Selected Answer: B
https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago