exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 156 discussion

A company is developing a new serverless API by using Amazon API Gateway and AWS Lambda. The company integrated the Lambda functions with API Gateway to use several shared libraries and custom classes.

A solutions architect needs to simplify the deployment of the solution and optimize for code reuse.

Which solution will meet these requirements?

  • A. Deploy the shared libraries and custom classes into a Docker image. Store the image in an S3 bucket. Create a Lambda layer that uses the Docker image as the source. Deploy the API's Lambda functions as Zip packages. Configure the packages to use the Lambda layer.
  • B. Deploy the shared libraries and custom classes to a Docker image. Upload the image to Amazon Elastic Container Registry (Amazon ECR). Create a Lambda layer that uses the Docker image as the source. Deploy the API's Lambda functions as Zip packages. Configure the packages to use the Lambda layer.
  • C. Deploy the shared libraries and custom classes to a Docker container in Amazon Elastic Container Service (Amazon ECS) by using the AWS Fargate launch type. Deploy the API's Lambda functions as Zip packages. Configure the packages to use the deployed container as a Lambda layer.
  • D. Deploy the shared libraries, custom classes, and code for the API's Lambda functions to a Docker image. Upload the image to Amazon Elastic Container Registry (Amazon ECR). Configure the API's Lambda functions to use the Docker image as the deployment package.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
lunt
Highly Voted 2 years, 2 months ago
Selected Answer: D
Don't understand why so many people are choosing B. Read up. A container image cannot be used with Lambda layers. That means A B C are out instantly. Its literally one of the first things they mention about Lamba layers. Answer is D and ABC simply impossible to configure. https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
upvoted 44 times
titi_r
12 months ago
You can create a Lambda function from an ECR image, but you CANNOT create a Lambda function layer from an ECR image!
upvoted 3 times
...
Gabehcoud
1 year, 8 months ago
https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/ Previously, Lambda functions were packaged only as .zip archives. This includes functions created in the AWS Management Console. You can now also package and deploy Lambda functions as container images. You can use familiar container tooling such as the Docker CLI with a Dockerfile to build, test, and tag images locally. Lambda functions built using container images can be up to 10 GB in size. You push images to an Amazon Elastic Container Registry (ECR) repository, a managed AWS container image registry service. You create your Lambda function, specifying the source code as the ECR image URL from the registry.
upvoted 3 times
...
rtgfdv3
2 years, 1 month ago
https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/
upvoted 3 times
...
c73bf38
2 years, 2 months ago
B suggests deploying the shared libraries and custom classes to a Docker image, uploading it to Amazon Elastic Container Registry (Amazon ECR), creating a Lambda layer that uses the Docker image as the source, and deploying the API's Lambda functions as Zip packages. Configuring the packages to use the Lambda layer simplifies deployment, and the Docker image allows for code reuse. This option takes advantage of the built-in features provided by AWS API Gateway and Lambda, making it the optimal solution.
upvoted 5 times
c73bf38
2 years, 2 months ago
The requirement is code reuse: https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/ Lambda functions packaged as container images do not support adding Lambda layers to the function configuration. However, there are a number of solutions to use the functionality of Lambda layers with container images. You take on the responsible for packaging your preferred runtimes and dependencies as a part of the container image during the build process.
upvoted 4 times
...
...
...
Untamables
Highly Voted 2 years, 3 months ago
Selected Answer: D
Option A, B and C are wrong. An AWS Lambda Layer does not support a Docker image or a deployed container as the source. https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/
upvoted 8 times
...
albert_kuo
Most Recent 2 months ago
Selected Answer: D
Lambda Layer does not support Docker image.
upvoted 1 times
...
kgpoj
8 months, 4 weeks ago
Selected Answer: D
If any of you ever really worked in lambda with docker image, you will instantly choose D without hesitation. zipped package can be deployed straightaway and it doesn't need a container. Don't get those two things(lambda zip deployment vs lambda container deployment) mixed up
upvoted 1 times
...
zolthar_z
9 months, 2 weeks ago
Selected Answer: D
Please read the requirement, "simplify the deployment" with D you need only to maintain the docker image, with B you need to maintain the docker image and the process to deploy the lambda as ZIP Packages.
upvoted 1 times
...
Nicoben
1 year, 4 months ago
Selected Answer: B
Option B is the right one, see: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html
upvoted 2 times
...
career360guru
1 year, 4 months ago
Selected Answer: D
Option D
upvoted 1 times
...
severlight
1 year, 5 months ago
Selected Answer: D
check Iunt's answer
upvoted 1 times
...
rlf
1 year, 6 months ago
B. * A Lambda layer is a .zip file archive that contains supplementary code or data. Layers usually contain library dependencies, a custom runtime, or configuration files. * Lambda functions packaged as container images do not support adding Lambda layers to the function configuration.However, there are a number of solutions to use the functionality of Lambda layers with container images. You take on the responsible for packaging your preferred runtimes and dependencies as a part of the container image during the build process.
upvoted 2 times
...
dkcloudguru
1 year, 7 months ago
Ans is D: https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/#:~:text=Lambda%20functions%20packaged%20as%20container,Lambda%20layers%20with%20container%20images.
upvoted 1 times
...
Gabehcoud
1 year, 8 months ago
Answer B. Previously, Lambda functions were packaged only as .zip archives. This includes functions created in the AWS Management Console. You can now also package and deploy Lambda functions as container images. You can use familiar container tooling such as the Docker CLI with a Dockerfile to build, test, and tag images locally. Lambda functions built using container images can be up to 10 GB in size. You push images to an Amazon Elastic Container Registry (ECR) repository, a managed AWS container image registry service. You create your Lambda function, specifying the source code as the ECR image URL from the registry.
upvoted 2 times
vn_thanhtung
1 year, 8 months ago
https://www.youtube.com/watch?v=17R0vN8bt-0
upvoted 1 times
...
...
ggrodskiy
1 year, 9 months ago
Correct B.
upvoted 2 times
...
NikkyDicky
1 year, 10 months ago
Selected Answer: D
D layers not supported w container-based lambdas
upvoted 1 times
...
pupsik
1 year, 10 months ago
Selected Answer: D
Docker images cannot be used in Lambda layers.
upvoted 1 times
...
Jackhemo
1 year, 10 months ago
Selected Answer: B
From olabiba.ai: Overall, option B provides a streamlined approach to optimize code reuse by centralizing the shared code in a Docker image and using a Lambda layer to share it across multiple functions.
upvoted 1 times
...
Roontha
1 year, 11 months ago
Answer : B
upvoted 1 times
...
rbm2023
1 year, 11 months ago
Selected Answer: B
"Lambda functions packaged as container images do not support adding Lambda layers to the function configuration. However, there are a number of solutions to use the functionality of Lambda layers with container images. You take on the responsible for packaging your preferred runtimes and dependencies as a part of the container image during the build process." https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/
upvoted 6 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