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?

feita há 2 anos320 visualizações
1 Resposta
0
Resposta aceita

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
ESPECIALISTA
Uri
respondido há 2 anos
profile picture
ESPECIALISTA
avaliado há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas