0

I have a simple personal project I work on from time to time to learn AWS.

Recently I received an alert emailk from aws stating that I'm reaching the free tier quota for one or more services with the following table:

Product AWS Free Tier Usage as of 06/27/2024 Usage Limit AWS Free Tier Usage Limit
AWSQueueService 863587 Requests 1000000 Requests 1000000.0 Requests are always free per month as part of AWS Free Usage Tier (Global-Requests)

The project is mostly serverless architecture developed with the CDK, it has not and never will reach a production stage, no one will ever see nor use it, barely I use it a part from some testing calls.

The project have 4 SQS queuese, each of which trigger a single Lambda function, so checking the monitoring section of each queue I see all the charts are 0 except for Number of Empty Receives:
enter image description here enter image description here enter image description here enter image description here

I'm still learning on AWS services integrations, so what comes to my mind is that Lambda is continuously polling SQS, thus making requests, while I tought that where SQS the one calling Lambda when new messages where ready, is that correct?

If it is so, how can I reduce the calls from Lambda to SQS? I'm not interested in performance, I just want to not exceed the monthly free tier quota.

Update #1

As @ceejayoz suggested, I need to lower the polling rate from the Lambda service, but don't really know how. In my CDK project I did not configure the triggers, so the deafult configuration is in place for every function, here is one:
enter image description here

6
  • Six receives per minute times four queues is going to be 34,560/day; I presume this has been running ~24 days? Can you reduce your SQS polling frequency?
    – ceejayoz
    Commented Jun 28 at 13:46
  • That's what I'm talking about: Is it possible? How? I'm still learning so don't really know where to look for this.
    – fudo
    Commented Jun 28 at 14:04
  • It's certainly possible, but we'd need to know much more about your setup.
    – ceejayoz
    Commented Jun 28 at 14:06
  • i did not configured the triggers from the cdk project, so there is the default configuration for each function. Updated the question.
    – fudo
    Commented Jun 28 at 14:14
  • I think stackoverflow.com/questions/52904643/… might be useful; you may be best suited by SNS triggering the Lambda instead of polling a mostly empty queue.
    – ceejayoz
    Commented Jun 28 at 14:19

0

You must log in to answer this question.

Browse other questions tagged .