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?

已提問 2 年前檢視次數 320 次
1 個回答
0
已接受的答案

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
專家
Uri
已回答 2 年前
profile picture
專家
已審閱 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南