AWS SQS Logging Message Consumption

0

According to the referenced article the SQS supports the following logging actions (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-logging-using-cloudtrail.html):

AddPermission

CreateQueue

DeleteQueue

PurgeQueue

RemovePermission

SetQueueAttributes

TagQueue

UntagQueue

I have a requirement to log SQS API requests for the consumption of SQS queue messages? Is there a solution for this?

gefragt vor 2 Jahren320 Aufrufe
1 Antwort
0
Akzeptierte Antwort

No. SQS logs to CloudTrail the control plane APIs (as listed in your question). Consuming messages from a queue is a Data plane API, and only a few services (S3, DynamoDB and Lambda) support logging those messages to CloudTrail. SQS is not one of them.

If you need to log all those messages, do it in your application. Another option, that is relevant depending for the reason for the logging requirement, is to send the events to EventBridge and create a Rule with two targets. The first is the SQS queue. The second target is CloudWatch logs. This way all the messages will get to the application as well as to CWL.

profile pictureAWS
EXPERTE
Uri
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen