Skip to main content

Privacera Platform

Configure S3 for real-time scanning
:
Configure S3 for real-time scanning

To configure S3 Buckets for enabling realtime scan, use the following steps:

  1. Configure event notification from S3 bucket to SQS Queue.

    1. Login to AWS console and go to S3 service.

    2. Navigate to your bucket which needs to be realtime scanned.

    3. Under Properties tab, navigate to the Event Notifications section and choose Create event notification.

    4. In the Event name, enter a name.

    5. For real-time scanning - In the Event types section, select PUT, POST, COPY, Multipart upload completed, and All object delete events. You will receive notifications for these event types.

      For AWS S3 tag sync - In the Event types --> Object Tagging section, select Object tags added and Object tags deleted. You will receive notifications for these event types.

    6. Select Destination type as SQS Queue, and then, from the dropdown list, choose the SQS queue. If SQS queue was auto-created by PM, then the name will be prefixed by privacera_bucket_sqs_ along with your environment name {{DEPLOYMENT_ENV_NAME}}.

    7. Click Save Changes.

    Related Information

    Refer the AWS documentation for a detailed information on event notifications, click here.

  2. Apply access policy in SQS Queue to allow S3 bucket to send events.

    1. Navigate to SQS Queue and select the queue on which the access policy is to be applied.

    2. Provide the correct Access Policy to SQS queue, so that S3 is allowed to put events into SQS queue. Refer to the following example to apply access policy:

         {"Version":"2012-10-17","Id":"arn:aws:sqs:{region_name}:{account_id}:{sqs_queue_name}/SQSDefaultPolicy","Statement":[{"Sid":"AllowS3Notify1","Effect":"Allow","Principal":{"AWS":"*"},"Action":"SQS:SendMessage","Resource":"arn:aws:sqs:{region_name}:{account_id}:{sqs_queue_name}","Condition":{"ArnLike":{"aws:SourceArn":"arn:aws:s3:*:*:{s3_bucket_to_be_scanned}"}}}]}
      

    Related Information

    Refer the AWS documentation for a detailed information on SQS access policy, click here.

Enable AWS S3 tag sync