Cannot decide which service should be used to log user activity

0

Hi!

In our company, we provide customers a backoffice where they can perform multiple actions (executing payments, refunds, etc). We need to log these actions in a chronological order so we can check what each user does. I've been checking eventbridge so, each time users do something, we send an event to eventbridge and this would trigger a lambda that would store the event information in dynamoDB for example. But we have also thought of using SQS, which would also trigger that same lambda. Which service would be more suitable to send all this customer actions? We can also send them directly to the lambda, so we don't know that would be the main advantage about using eventbridge or SQS.

As events won't be able to be modified, would DynamoDB be the best storage option to store them?

Thank you for your help!

Pascual
질문됨 일 년 전251회 조회
1개 답변
1

The missing part of the question is: What do you want to do with the data once it it stored? How are you going to query it? And how often?

If you need to query the data regularly and with low latency, DynamoDB could be a good option. That said, a relational database or a time series database might be more suitable depending on the query patterns.

However, if you are storing the data for archival purposes and you don't need millisecond responses to queries then I would send it to Kinesis Firehose; store the data in a "queryable" format in S3 and then query it using Athena. This is likely to be more cost effective.

profile pictureAWS
전문가
답변함 일 년 전
  • We will need to query the data once in a while, and we don't need milliseconds response times, as queries will be performed by our internal teammates just to know what a user did (whenever there's an issue). For example, a basic scenario would be 100 users using our control panel everyday where we log all their actions. Maybe, in a couple of months, we need to check what a user did the day X because an issue appeared with some resource belonging to that user. DynamoDB seems to be fine, but would it be better to send data directly to dynamoDB or using eventbridge/SQS would be more efficient?

  • If your application that is sending the data can communicate with DynamoDB directly - send the data there without using any other services. That's more cost effective. EventBridge/SQS are great where you need to queue data (SQS) or have multiple consumers (EventBridge) - in either case where the back-end database doesn't scale. DynamoDB will scale so there's no need to add complexity.

  • Ok, will do that. Thank you for your help!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠