aws-samples / aws-control-tower-config-customization

MIT No Attribution
26 stars 25 forks source link

Use SNS instead of SQS for communication between Producer and Consumer #18

Open blauerberg opened 3 weeks ago

blauerberg commented 3 weeks ago

Issue #, if available:

Description of changes:

The Lambda handler was short-polling SQS, which resulted in a very large number of API requests to SQS.

This activity was consuming a significant portion of my free monthly tier of SQS. I fixed this issue by using SNS instead of SQS.

This change may result in reduced message ordering accuracy (unless we use FIFO queues instead of standard ones). Since the events are not triggered frequently, this may not pose any significant issues. The solution has been working well in my environment.

This repository solution has been very helpful in reducing costs. Thanks!

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.