aws-samples/powertools-for-aws-lambda-workshop

Bug (content-hub-repository): S3 upload via pre-signed url doesn't deliver notifications

dreamorosi opened this issue · 1 comments

After a file is uploaded by the client for the first time, via pre-signed url, we want to perform some actions.

At the moment I have configured an event notification on the S3 bucket where the objects are uploaded but the Lambda function doesn't get triggered (I have tried also with a SNS topic).

Below an example of the configuration that is currently in the backend/lib/infra-stack.ts file:

bucket.addEventNotification(
  EventType.OBJECT_CREATED_PUT,
  new LambdaDestination(markCompleteUploadFn),
  {
    prefix: "uploads/*",
  }
);

I was able to confirm that it's not a permission issue because uploading a file via AWS CLI does trigger the notification.

However when uploading via the client the notification doesn't get triggered.

This is issue tracks the activities needed to investigate & fix the issue.

Issue is fixed, currently by this rule & Lambda integration.

However after the discussion this issue might not be relevant anymore.