exam questions

Exam AWS Certified Solutions Architect - Professional All Questions

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

Exam AWS Certified Solutions Architect - Professional topic 1 question 679 discussion

A company has a primary Amazon S3 bucket that receives thousands of objects every day. The company needs to replicate these objects into several other S3 buckets from various AWS accounts. A solutions architect is designing a new AWS Lambda function that is triggered when an object is created in the main bucket and replicates the object into the target buckets. The objects do not need to be replicated in real time. There is concern that this function may impact other critical
Lambda functions due to Lambda's regional concurrency limit.
How can the solutions architect ensure this new Lambda function will not impact other critical Lambda functions?

  • A. Set the new Lambda function reserved concurrency limit to ensure the executions do not impact other critical Lambda functions. Monitor existing critical Lambda functions with Amazon CloudWatch alarms for the Throttles Lambda metric.
  • B. Increase the execution timeout of the new Lambda function to 5 minutes. Monitor existing critical Lambda functions with Amazon CloudWatch alarms for the Throttles Lambda metric.
  • C. Configure S3 event notifications to add events to an Amazon SQS queue in a separate account. Create the new Lambda function in the same account as the SQS queue and trigger the function when a message arrives in the queue.
  • D. Ensure the new Lambda function implements an exponential backoff algorithm. Monitor existing critical Lambda functions with Amazon CloudWatch alarms for the Throttles Lambda metric.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
liono
Highly Voted 3 years, 11 months ago
A is correct, https://aws.amazon.com/blogs/compute/managing-aws-lambda-function-concurrency/
upvoted 25 times
cpd
3 years, 11 months ago
Thank you, very nice blog.
upvoted 1 times
...
rscloud
3 years, 11 months ago
Thankyou, very informative blog! A is correct
upvoted 2 times
...
gerhardbl
3 years ago
But those other Lambda functions would now be running in different accounts where the target buckets are, hence there would be no impact on the 'key' Lambdas in the main account. Also by using Lambda to process SQS, it will pull multiple messages off the queue at once, instead of firing up a new concurrent Lambda for every object that needs to be copied. Lastly, if you set a Reserved Concurrency limit on the Lambdas that process these large quantities of S3 uploads, and the limit is hit, you will start losing data and your buckets will be out of sync. I think just using Reserved Concurrency is too simple here; they are looking for one step further.
upvoted 1 times
...
kirrim
3 years, 9 months ago
Agree! Another document supporting A: https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html "Your function can't scale out of control – Reserved concurrency also limits your function from using concurrency from the unreserved pool, which caps its maximum concurrency. You can reserve concurrency to prevent your function from using all the available concurrency in the Region, or from overloading downstream resources."
upvoted 2 times
...
...
PredaOvde
Highly Voted 3 years, 10 months ago
I choose C. Let me explain why I don't think A is the right approach: if you set Reserved concurrency to let's say 200, I make myself 2 questions: 1) 800 instances will remain available for other lambdas. How do you guarantee 800 is enough for other lambdas? Perhaps 999 lambdas was answering in a timely manner to all the requests and adding a new lambda will break everything. 2) Assigning 200 Reserved instances to the new Lambda does not guarantee that will be enough for the new Lambda. Maybe it requires 500? So, adding SQS queue resolve both of the problems. Thoughts?
upvoted 15 times
cannottellname
3 years, 6 months ago
I believe SQS queue + Lamda Reserve will help solve the issue. Not keeping Lambda limit/reserve have a chance that concurrency is fully utilized by this only.
upvoted 2 times
...
...
sumaju
Most Recent 1 year, 8 months ago
Selected Answer: A
Problem with option D is it will trigger every time a message is received in SQS, which is similar to trigger Lambda function through s3 event notification. If Lambda is designed to process in Batch, then D will be more appropriate, but there will be a risk of Lambda timeout. So A should be a better choice.
upvoted 1 times
...
SkyZeroZx
2 years, 1 month ago
Selected Answer: A
A according to this youtube explanation: https://youtu.be/kNtOhcpju6g
upvoted 2 times
...
dev112233xx
2 years, 4 months ago
Selected Answer: A
A according to this youtube explanation: https://youtu.be/kNtOhcpju6g
upvoted 1 times
...
syaldram
2 years, 7 months ago
Selected Answer: A
I am going to go with A on this one. Reserved concurrency because even with SQS you will still use up the allowed concurrency.
upvoted 2 times
...
timmysixstrings
2 years, 9 months ago
Selected Answer: A
This is what reserved concurrency is for
upvoted 2 times
...
Amsa
2 years, 9 months ago
Selected Answer: A
Straight from Jon Bonso tests and correct answer is A. Explanation: Concurrency is the number of requests that your function is serving at any given time. When your function is invoked, Lambda allocates an instance of it to process the event. When the function code finishes running, it can handle another request. If the function is invoked again while a request is still being processed, another instance is allocated, which increases the function's concurrency. Concurrency is subject to a Regional quota that is shared by all functions in a Region. There are two types of concurrency available: Reserved concurrency – Reserved concurrency creates a pool of requests that can only be used by its function, and also prevents its function from using unreserved concurrency. Provisioned concurrency – Provisioned concurrency initializes a requested number of execution environments so that they are prepared to respond to your function's invocations.
upvoted 2 times
...
astalavista1
2 years, 11 months ago
Selected Answer: C
"The objects do not need to be processed in real-time" - SQS gives you the option to process in batches, you can also delay delivery to ensure Lambda isn't swarmed with multiple concurrent executions from the object upload.
upvoted 2 times
...
jyrajan69
3 years, 1 month ago
Key point, addition of this new Lambda function has no adverse effect on other key Lambda functions? So how does C address that? Only A provides and answer with reserved concurrency
upvoted 2 times
...
azurehunter
3 years, 2 months ago
Answer is A. C is wrong because the Lamdba functions which read the message from SQS may scale out to 1000 if hundreds of thousands of upload occur in a very short time. It will impact the other Lamdba functions. Refer to https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html
upvoted 1 times
...
jj22222
3 years, 4 months ago
Selected Answer: C
C. Configure S3 event notifications to add events to an Amazon SQS queue in a separate account. Create the new Lambda function in the same account as the SQS queue and trigger the function when a message arrives in the queue.
upvoted 2 times
...
pititcu667
3 years, 6 months ago
Selected Answer: A
I think A is correct.
upvoted 1 times
...
shotty1
3 years, 6 months ago
Selected Answer: C
I think this is C
upvoted 2 times
...
tkanmani76
3 years, 7 months ago
C is right - The concurrency space available is common for all the functions in the region. By reserving concurrency for a function we ensure no other function can use that concurrency space. However this limits the ability to use the concurrency from open pool.
upvoted 2 times
...
cldy
3 years, 8 months ago
C. Configure S3 event notifications to add events to an Amazon SQS queue in a separate account. Create the new Lambda function in the same account as the SQS queue and trigger the function when a message arrives in the queue.
upvoted 1 times
...
AzureDP900
3 years, 8 months ago
I am going with C
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 ...