Ends in

Get $3 OFF ALL CCP, SAA, CDA, and SysOps Video Courses!

Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified Solutions Architect Professional Question on SQS to reduce load

  • varun-mathur

    May 1, 2020 at 4:45 pm

    Hi Jon,

    The following question is asking about how to reduce load on DynamoDB, and SQS is listed as the answer. I think the load that a DynamoDB user cares about is RCU/WCU, and that would not change irrespective of SQS.

    If you mean transactions per second or CPU utilization for DynamoDB as its load, given that DynamoDB is a managed service auto-scaled by AWS, that consideration is not relevant.

    Please advise.

    The question is:

    You are developing a cryptocurrency exchange platform in AWS which uses Lambda, API Gateway, and DynamoDB. It is expected that millions of investors will sign up and use your platform. Which of the following can reduce the load on your DynamoDB database?

  • Jon-Bonso

    May 5, 2020 at 8:22 am

    Hi Varun,

    Thank you for posting your question. We always strive to make the options in our practice tests as tricky as possible to mimic the actual AWS exam. In this scenario, you also have to consider the WCU of the DynamoDB table to handle the load or to use on-demand capacity mode to save on cost (rather than the provisioned mode). Although DynamoDB is a fully managed service, you still have to do some fine-tuning in order to achieve maximum cost-effectiveness.

    For example, if your application has a high usage load and is sending 100 eventually consistent reads per second and 100 standard writes per second, that could translate to 50 RCU and 400 WCU. If you used the provisioned mode, that can add up to about $198. Of course, this price can be lowered down if you used Auto Scaling, but take note that Option 2 explicitly mentioned “Provisioned” capacity as you won’t be able to set the WCU using the On-Demand mode.

    Sample DynamoDB configuration screenshot:


    However, if you used SQS, you are only charged for $0.00000040 per request or $0.40 if you have 1 million requests. This will definitely help the application to scale out and avoid having 100+ parallel requests per second to DynamoDB, since the message/workload is queued up.

    Hence, I don’t think that adding an SQS queue will significantly raise the cost in comparison with setting the WCU of the DynamoDB table. Moreover, manually setting WCU is not enough, you should also set up the RCU as well which is actually left out in the other options:


    It is true that you will write the same amount of data to DynamoDB table, however, SQS will queue up those hundreds of requests so these will not be sent at the same time. As you know, the RCU and WCU setting of your DynamoDB table largely depends on the number of requests your application sent to DynamoDB per second. So in the above example that I mentioned, if the item size id 4 KB and your application is sending 100 eventually consistent read requests, then the RCU needed would be 50. If there are 100 write requests, then the WCU needed is 400, which will bring in an estimated cost of $198 per month (if using provisioned-mode, which clearly what is mentioned in the option).

    However, if your application has a queue system, it can delay some of the requests from 100 to 50 (or even less) requests, which will also bring down the required WCU/RCU needed. Instead of that $198 per month, it can only be less than half or even lower than that. This is the justification behind this scenario.

    Let us know if you need further assistance. The Tutorials Dojo team is dedicated to help you pass your AWS exam on your first try!


    Jon Bonso @ Tutorials Dojo

    • This reply was modified 4 years, 2 months ago by  Jon-Bonso.
Viewing 1 - 2 of 2 replies

Log in to reply.

Original Post
0 of 0 posts June 2018