Enable Real-time Scanning of S3 Buckets
To enable realtime scanning of S3 buckets:
-
To Enable Real-Time Scanning for AWS S3, see Account > Discovery.
-
To connect a new AWS S3 application, see AWS S3 Application. Alternatively, to edit an existing AWS S3 application, do the following steps:
-
Go the Setting > Applications.
-
In the Applications screen, select S3.
-
Click the pen icon next to the Account Name.
-
Disable and enable the toggle button to see the configuration screen.
-
Click the Real-Time Enable toggle button.
-
Click the clipboard icon to copy the Real-Time Event Name, which will be used to configure event notifications from S3 buckets in the AWS account.
-
Click SAVE.
-
-
Apply access policy in the SQS Queue to allow the S3 bucket to send events. Refer to the AWS documentation for detailed information on configuring access policy steps - Click here
-
Navigate to SQS Queue and select the queue (test_queue).
-
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":"2008-10-17", "Id":"__default_policy_ID", "Statement":[ { "Sid":"__owner_statement", "Effect":"Allow", "Principal":{ "Service":"s3.amazonaws.com", "AWS":"arn:aws:iam::111111111111:root" }, "Action":"SQS:*", "Resource":"arn:aws:sqs:us-east-1:111111111111:test_queue" } ] }
-
-
Configure event notifications from S3 buckets to the SQS Queue. See the AWS documentation for detailed information.
-
Go to the S3 bucket you want to link with the SQS queue.
-
On the Properties tab, navigate to the Event Notifications section and choose Create event notification.
-
In the event name, paste the Real-Time Event Name copied from the step 2.e above. And then give a bucket name. For example, test-bucket.
-
Select the event type as required from Event types.
-
Select Destination type as SQS Queue, and then choose the SQS queue (test_queue) from the dropdown list.
-
Click Save Changes.
-
-
Include and scan resources from datasource.
-
Navigate to Discovery > Data Source.
-
On the Data Source page, click the S3 application that needs to be set up for realtime scanning. The selected S3 application details are displayed.
-
Click Include Resources tab and ensure that the check mark is displayed when the realtime scanning is enabled.
-
Click Add to add a resource.
-