Export Audit Logs to S3
Public preview: This feature is public preview and available to all accounts.
Create an S3 bucket policy for the export
Before Immuta can export audit events to your S3 bucket, you need to create a bucket policy that allows the Immuta audit service to add objects to your specified S3 bucket. The following Amazon S3 action will be granted to the audit service in the bucket policy:
s3:PutObject: Adds an object to a bucket.
To create the policy for the bucket, you must be the bucket owner.
Follow AWS documentation for adding a bucket policy in the Amazon S3 console. To create the policy for the bucket, you must be the bucket owner.
Edit the JSON in the Policy section to include a bucket policy like the example below. In this example, the policy allows immuta-audit-service (the Principal) to add objects to customer-bucket-name (and the contents within that bucket).
Note: If you use this example, replace the content in angle brackets with your Amazon Resource Name (ARN) and bucket name.
Save your changes.
Configure the audit export to S3
You can configure your audit export destination using one of two methods:
Using the Immuta CLI
Install the Immuta CLI
Download the binary in a tab below that corresponds to your operating system:
Linux x86_64 (amd64)
Linux ARMv8 (arm64)
Configure the Immuta CLI
For descriptions of the commands used below, see the Immuta audit export configuration CLI reference guide.
The SHA 256 checksum is available to verify the file at https://immuta-platform-artifacts.s3.amazonaws.com/cli/latest/immuta_cli_SHA256SUMS.
Run
immuta configure
in your terminal.Enter the URL of your Immuta tenant in the interactive prompt.
Enter your Immuta API Key.
Configure Immuta to export audit logs to S3
Set the following parameters in a JSON or YAML file:
interval: The interval at which audit logs will be exported to your S3 bucket. They can be sent at 2-, 4-, 6-, 12-, or 24-hour intervals.
bucket name: Name of the bucket your audit logs will be sent to.
bucket path: Path to your bucket in Amazon S3.
region: AWS region (such as "us-east-1").
accessKeyId: AWS access key ID.
secretAccessKey: AWS secret access key.
Configure these settings in Immuta by running the following command:
List all configurations
To view all of the export configurations created for your instance of Immuta, run the following command:
View a configuration
To review a specific export configuration, run the get command with the export configuration ID as the argument:
Disable a configuration
To disable a configuration, run the following command with the export configuration ID as the argument:
Enable a configuration
To enable a disabled configuration, run the following command with the export configuration ID as the argument:
Delete a configuration
To delete an export configuration, run the following command with the export configuration ID as the argument:
Using the audit service GraphQL API
Configure Immuta to export audit logs to S3
Pass the following fields into the $data variable used in the mutation in the next step:
interval: The interval at which audit logs will be exported to your S3 bucket. They can be sent at 2-, 4-, 6-, 12-, or 24-hour intervals.
bucket name: Name of the bucket your audit logs will be sent to.
bucket path: Path to your bucket in Amazon S3.
region: AWS region (such as "us-east-1").
accessKeyId: AWS access key ID.
secretAccessKey: AWS secret access key.
Configure these settings in Immuta using the
createS3ExportConfiguration
mutation:
Disable a configuration
To disable a configuration, use the disableExportConfiguration
mutation:
Enable a configuration
To enable a disabled configuration, use the enableExportConfiguration
mutation:
Last updated