DVA-C02 exam dumps

DVA-C02 practice question 304 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 304

Single answer

You are developing a serverless application using AWS Lambda. Your function has several dependencies from third-party Python libraries. The deployment package size exceeds the maximum Lambda deployment package size limit of 50 MB when compressed. Which approach should you take to successfully deploy your Lambda function?

  1. A

    Use AWS Lambda Layers to include your dependencies separately from the function code.

  2. B

    Compress the deployment package further using advanced compression algorithms to reduce the size.

  3. C

    Upload the deployment package to an S3 bucket and reference it directly in the Lambda function configuration.

  4. D

    Split the Lambda function into smaller functions to reduce the size of individual deployment packages.

Show answer and explanation

Correct answer: A

Explanation

When the deployment package size exceeds the Lambda limit, using AWS Lambda Layers is the recommended solution. Layers allow you to package and manage dependencies separately from your function code, reducing the size of the deployment package and enabling reusability across multiple functions.

  • A. Correct.

    Correct. AWS Lambda Layers allow you to include external dependencies separately from your function's deployment package, helping you manage large dependencies effectively.

  • B. Incorrect.

    Incorrect. While compression reduces size, it is unlikely to sufficiently reduce the size beyond AWS Lambda's limits if the package already exceeds the 50 MB compressed limit.

  • C. Incorrect.

    Incorrect. AWS Lambda does not natively support referencing deployment packages directly from S3. The deployment package must still adhere to Lambda's size limits.

  • D. Incorrect.

    Incorrect. Splitting the function may not address the core issue of large dependencies. This approach also increases architectural complexity unnecessarily.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam