Amazon Macie – Supported services · Wazuh documentation

Once the rule is created, data will start to be sent to the previously created S3 bucket. Remember to first enable the service you want to monitor, otherwise, you won’t get any data.

Give the rule some name and click on the Create rule button:

Select the services you want to get logs from using the Service name slider, then, click on the Add target button and add the previously created Firehose delivery stream there. Also, create a new role to access the delivery stream.

Select Rules on the left menu and click on the Create rule button:

The following page is just a summary of the Firehose stream created, go to the bottom of the page and click on the Create delivery stream button:

Give a proper name to the role and click on the Allow button:

You can select the compression you prefer. Wazuh supports any kind of compression but Snappy. After that, click on Create new or choose :

Select Amazon S3 as the destination, then select the previously created S3 bucket and add a prefix where logs will be stored. AWS Firehose creates a file structure YYYY/MM/DD/HH, if a prefix is used the created file structure would be firehose/YYYY/MM/DD/HH. If a prefix is used it must be specified under the Wazuh Bucket configuration:

On the next page, leave both options as Disabled and click on Next:

Put a name to your delivery stream and click on the Next button at the bottom of the page:

If it’s the first time you’re using this service, you’ll see the following screen. Just click on Get started:

Create a new S3 bucket. (If you want to use an already created one, skip this step).

Policy configuration

To create a policy using the Amazon Web Services console, follow the AWS documentation.

Take into account that the policies below follow the principle of least privilege to ensure that only the minimum permissions are provided to the Wazuh user.

To allow an AWS user to use the module with read-only permissions, it must have a policy like the following attached:

{

"Version"

:

"2012-10-17"

,

"Statement"

:

[

{

"Sid"

:

"VisualEditor0"

,

"Effect"

:

"Allow"

,

"Action"

:

[

"s3:GetObject"

,

"s3:ListBucket"

],

"Resource"

:

[

"arn:aws:s3:::bucket-name/*"

,

"arn:aws:s3:::bucket-name"

]

}

]

}

If it is necessary to delete the log files once they have been collected, the associated policy would be as follows:

{

"Version"

:

"2012-10-17"

,

"Statement"

:

[

{

"Sid"

:

"VisualEditor0"

,

"Effect"

:

"Allow"

,

"Action"

:

[

"s3:GetObject"

,

"s3:ListBucket"

,

"s3:DeleteObject"

],

"Resource"

:

[

"arn:aws:s3:::bucket-name/*"

,

"arn:aws:s3:::bucket-name"

]

}

]

}

Once a policy has been created, there are different methods available to attach it to a user, such as attaching it directly or to a group to which the user belongs. More information on how to perform those tasks on the AWS documentation.