Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
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 491 discussion

A company is developing a latency-sensitive application. Part of the application includes several AWS Lambda functions that need to initialize as quickly as possible. The Lambda functions are written in Java and contain initialization code outside the handlers to load libraries, initialize classes, and generate unique IDs.

Which solution will meet the startup performance requirement MOST cost-effectively?

  • A. Move all the initialization code to the handlers for each Lambda function. Activate Lambda SnapStart for each Lambda function. Configure SnapStart to reference the $LATEST version of each Lambda function.
  • B. Publish a version of each Lambda function. Create an alias for each Lambda function. Configure each alias to point to its corresponding version. Set up a provisioned concurrency configuration for each Lambda function to point to the corresponding alias.
  • C. Publish a version of each Lambda function. Set up a provisioned concurrency configuration for each Lambda function to point to the corresponding version. Activate Lambda SnapStar for the published versions of the Lambda functions.
  • D. Update the Lambda functions to add a pre-snapshot hook. Move the code that generates unique IDs into the handlers. Publish a version of each Lambda function. Activate Lambda SnapStart for the published versions of the Lambda functions.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Russs99
Highly Voted 4 months, 4 weeks ago
Selected Answer: D
While option B improves startup performance, it is generally more expensive than SnapStart because it keeps environments warm continuously.
upvoted 5 times
...
AzureDP900
Most Recent 1 week, 1 day ago
Option D is right This solution provides a good balance between performance and code organization. By moving the code that generates unique IDs into the handlers, you keep the initialization code out of the way, but still make it accessible when needed. The pre-snapshot hook allows you to run some initialization code before the Lambda function is executed, which can be useful for tasks like generating unique IDs. Publishing a version of each Lambda function and activating SnapStart ensures that the functions are running with the latest code and optimizations.
upvoted 1 times
...
JoeTromundo
1 month, 2 weeks ago
Selected Answer: D
For those who think option C is correct: as dzidis commented, "SnapStart does NOT support PROVISIONED CONCURRENCY" https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
upvoted 1 times
...
zolthar_z
2 months, 4 weeks ago
Selected Answer: D
https://aws.amazon.com/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/
upvoted 2 times
...
backbencher2022
3 months ago
Selected Answer: D
D is correct and as dzidis referred to AWS document, you can't use both provisioned concurrency and SnapStart for the same function version. Therefore, C can't be a correct option. Refer to this section of document for more details: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html#snapstart-concurrency
upvoted 1 times
...
dzidis
3 months, 1 week ago
Selected Answer: D
You can't use both SnapStart and provisioned concurrency on the same function version. Therefore cannot be C. https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
upvoted 3 times
...
vip2
4 months, 3 weeks ago
Selected Answer: D
D Combining provisioned concurrency with SnapStart is redundant While provisioned concurrency reduces cold start latency, it is more costly compared to SnapStart because it keeps a set number of instances warm and ready to handle requests, even when not in use.
upvoted 3 times
...
5ehjry6sktukliyliuliykutjhy
4 months, 3 weeks ago
Selected Answer: C
It is C
upvoted 1 times
...
[Removed]
4 months, 3 weeks ago
Selected Answer: C
Provisioned concurrency – This is the number of pre-initialized execution environments allocated to your function. These execution environments are ready to respond immediately to incoming function requests. Provisioned concurrency is useful for reducing cold start latencies for functions. Configuring provisioned concurrency incurs additional charges to your AWS account.
upvoted 1 times
...
mifune
5 months ago
Selected Answer: C
"Lambda SnapStart for Java can improve startup performance for latency-sensitive applications by up to 10x at no extra cost". Answer C.
upvoted 2 times
...
ebbff63
5 months ago
Selected Answer: C
Leverages both versioning and provisioned concurrency. Also Lambda SnapStart for improved startup performance.
upvoted 1 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 ...