「已注销」 2019-01-24 13:47 采纳率: 0%
浏览 160

捕获S3文件下载的开始和结束时间以及其他详细信息

I want to expose an API (preferably using AWS API gateway/ Lambda/Go) to the users.

Using this API, the users can download a binary file from S3 bucket.

I want to capture the metrics like, which user has started download of the file, the time at which the file download had started and finished.

I want to record these timestamps in DynamoDB.

S3 has support for Events for creating/modifying/deleting files, so I can write a lambda function for these events.

But S3 doesn't seems to have support for read actions ( e.g. download a file)

I am thinking to write a Lambda function, which will be invoked when the user calls the API to download the file. In the lambda, I want to record the timestamp, read the file into a buffer, encode it and then send it as as base64 encoded response to the client.

Let me know if there is any better alternative approach.

  • 写回答

2条回答 默认 最新

  • doucuo9126 2019-01-24 14:02
    关注

    use Amazon S3 Server Access Logging

    don't use DynamoDB, if you need to query the logs in the target bucket setup Spectrum to query the logs which are also in S3

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题