dongliuliu0385 2019-07-23 12:44
浏览 9

上载开始和结束时如何获得通知

I need to know if there's a way to get a notification from AWS S3 when the upload has started.

As of now I've set up aws lambda which notifies my backend when the PUT operation is finished, but I have no way to know when it has started (if it has started at all). This is required because my goroutine waits for the upload to be finished but I have no way to know when it has started, I could put a timeout on the goroutine but it would be tricky for large files and slow internet connections of clients because my backend would consider the operation failed when in reality the client might still be uploading the file.

  • 写回答

1条回答 默认 最新

  • douzhouqin6223 2019-07-23 14:57
    关注

    You can create an AWS CloudWatch rule for S3 by specifying Simple Storage Service (S3) as Service Name, Object Level Operations as Event Type, PutObject as Specific operation(s) and as Specific bucket(s) by name after creating a trail in AWS CloudTrail for S3's PutObject operation and specifying your desired target, for example, AWS Lambda function or AWS SNS topic to record the start time of an object upload on AWS S3 bucket.

    As soon as the PutObject API operation (someone uploads an object) will be performed, it will be recorded in AWS CloudTrail if the trail is created already.

    Note: You can also use CreateMultipartUpload or UploadPart as Specific operation(s) if required.

    评论

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统