Collect AWS RDS logs

Parser Version: 11.0

Supported in:

This guide explains how you can ingest Amazon Relational Database Service (Amazon RDS) logs into Google Security Operations using Amazon S3.

Amazon RDS is a managed relational database service that runs MySQL, MariaDB, PostgreSQL, Oracle, Microsoft SQL Server, and Amazon Aurora databases. Amazon RDS publishes database logs, such as audit, error, and query logs, to Amazon CloudWatch Logs.

CloudWatch Logs delivers log events in compressed batches that can hold thousands of events. Google SecOps stores every line of an ingested file as one raw log, and each UDM event keeps the raw log it came from. Split the batches into one line for each log event before ingestion, or every event carries the whole batch.

At a high level, logs flow through the pipeline in the following sequence:

  1. Amazon RDS publishes the database logs to CloudWatch Logs log groups.
  2. A CloudWatch Logs subscription filter sends the batches to an AWS Lambda function, directly or through Amazon Data Firehose.
  3. The Lambda function splits each batch into one JSON line for each log event and the logs land in an Amazon S3 bucket.
  4. Google SecOps reads the new files with an Amazon SQS V2 feed (notified by S3 event notifications) or an Amazon S3 V2 feed (scans the bucket).

Each line keeps the CloudWatch Logs format (owner, logGroup, logStream, subscriptionFilters, and a single entry in logEvents), so the AWS RDS parser reads it without changes.

Before you begin

Make sure the following prerequisites are met:

  • A Google SecOps instance
  • An Amazon RDS DB instance or Aurora DB cluster
  • Privileged access to AWS (Amazon RDS, CloudWatch Logs, AWS Lambda, Amazon Data Firehose, Amazon S3, Amazon SQS, IAM)

Publish AWS RDS logs to CloudWatch Logs

Some log types need a parameter group or option group setting before the database writes them:

Engine Log type Required setting
MySQL, MariaDB Audit log A custom option group with the MARIADB_AUDIT_PLUGIN option
MySQL, MariaDB General log A custom parameter group with general_log = 1 and log_output = FILE
MySQL, MariaDB Slow query log A custom parameter group with slow_query_log = 1 and log_output = FILE
Aurora MySQL Audit log A custom DB cluster parameter group with server_audit_logging = 1 and the events to record in server_audit_events
Oracle Audit log The audit_trail parameter set to a value other than none
PostgreSQL PostgreSQL log Optional: log_statement, log_min_duration_statement, or the pgaudit.log parameter for pgAudit

To configure your RDS DB instance or Aurora cluster to export logs to CloudWatch Logs, complete the following steps:

  1. Sign in to the AWS Management Console, search for RDS, and open the Amazon RDS console.
  2. In the navigation pane, click Databases.
  3. Select the DB instance. For Aurora, select the DB cluster.
  4. Click Modify.
  5. In the Log exports section, select the log types to publish:
    • MySQL and MariaDB: Audit log, Error log, General log, Slow query log
    • PostgreSQL: PostgreSQL log
    • Oracle: Alert log, Audit log, Listener log, Trace log
    • SQL Server: Agent log, Error log
  6. Click Continue.
  7. Click Modify DB instance (for Aurora, Modify cluster).

RDS creates one log group for each log type, with the following names:

  • DB instance: /aws/rds/instance/<DB_INSTANCE_ID>/<LOG_TYPE>
  • Aurora DB cluster: /aws/rds/cluster/<DB_CLUSTER_ID>/<LOG_TYPE>

For engine-specific details, see the AWS documentation:

Create an Amazon S3 bucket

Create all the AWS resources referenced in this guide in the same AWS Region as your RDS databases.

  1. Create an Amazon S3 bucket following this user guide: Creating a bucket.
  2. Save the bucket Name and Region for future reference (for example, rds-logs-secops).

Choose a feed type

Google SecOps can read the files in two ways. Choose one:

  • Amazon SQS V2 (recommended): S3 sends a notification to an SQS queue for each new file, and Google SecOps reads the file soon after it arrives.
  • Amazon S3 V2: Google SecOps scans the bucket on a schedule. You don't need an SQS queue.

Create an SQS queue and S3 event notifications

Skip this section if you use the Amazon S3 V2 feed. Create the queue and the notification before you start streaming, so that S3 sends a notification for every file.

Create the SQS queue

  1. In the AWS Management Console, search for and open the Amazon SQS console.
  2. Click Create queue.
  3. Provide the following configuration:
    • Type: Keep Standard (default).
    • Name: Enter rds-logs-secops.
  4. In the Access policy section, select Advanced and replace the policy with the following:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Principal": {
                    "Service": "s3.amazonaws.com"
                },
                "Action": "SQS:SendMessage",
                "Resource": "arn:aws:sqs:<AWS_REGION>:<AWS_ACCOUNT_ID>:rds-logs-secops",
                "Condition": {
                    "StringEquals": {
                        "aws:SourceAccount": "<AWS_ACCOUNT_ID>"
                    },
                    "ArnLike": {
                        "aws:SourceArn": "arn:aws:s3:::rds-logs-secops"
                    }
                }
            }
        ]
    }
    
  5. Replace <AWS_REGION> and <AWS_ACCOUNT_ID> with your Region and account ID.

  6. Click Create queue.

  7. Copy and save the queue ARN (for example, arn:aws:sqs:us-east-1:123456789012:rds-logs-secops).

Create the S3 event notification

  1. In the AWS Management Console, search for and open the Amazon S3 console, and select the bucket rds-logs-secops.
  2. Select the Properties tab.
  3. In the Event notifications section, click Create event notification.
  4. Provide the following configuration:
    • Event name: Enter rds-logs-to-sqs.
    • Prefix: Enter rds-logs/.
    • Event types: Select All object create events.
    • Destination: Select SQS queue, and then select rds-logs-secops.
  5. Click Save changes.

Split the logs and deliver them to Amazon S3

Choose one method:

  • Method 1: Lambda subscription filter (recommended): CloudWatch Logs invokes a Lambda function that splits each batch and writes it to S3. This method has the fewest components.
  • Method 2: Amazon Data Firehose with Lambda transformation: CloudWatch Logs sends the batches to a Firehose stream, a Lambda function splits them, and Firehose writes the result to S3. Use this method if you already route CloudWatch Logs through Firehose.

Both methods write files to s3://rds-logs-secops/rds-logs/YYYY/MM/DD/HH/, with one JSON line for each RDS log event.

Method 1: Lambda subscription filter

Create the IAM role for the Lambda function

  1. In the AWS Management Console, search for and open IAM, and then go to Roles > Create role.
  2. Select AWS service as the Trusted entity type and Lambda as the Use case.
  3. Click Next.
  4. Search for and select the policy AWSLambdaBasicExecutionRole.
  5. Click Next.
  6. In the Role name field, enter RdsLogsSplitterRole.
  7. Click Create role.
  8. Open the role RdsLogsSplitterRole.
  9. Click Add permissions > Create inline policy.
  10. Select the JSON tab and paste the following policy:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": "s3:PutObject",
                "Resource": "arn:aws:s3:::rds-logs-secops/rds-logs/*"
            }
        ]
    }
    
  11. Click Next.

  12. In the Policy name field, enter RdsLogsSplitterS3Write.

  13. Click Create policy.

Create the Lambda function

  1. In the AWS Management Console, search for and open Lambda, and then go to the Event Functions page.
  2. Click Create Event Function.
  3. Select Author from scratch and provide the following configuration:
    • Function name: Enter rds-logs-splitter.
    • Runtime: Select Python 3.14.
    • Execution role: Expand Change default execution role, select Use an existing role, and then select RdsLogsSplitterRole.
  4. Click Create Event Function.
  5. On the Code tab, replace the content of lambda_function.py with the following code:

    import base64
    import gzip
    import json
    import os
    from datetime import datetime, timezone
    
    import boto3
    from botocore.exceptions import ClientError
    
    s3 = boto3.client('s3')
    
    BUCKET = os.environ['S3_BUCKET']
    PREFIX = os.environ.get('S3_PREFIX', 'rds-logs').strip('/')
    ENVELOPE_KEYS = ('messageType', 'owner', 'logGroup', 'logStream', 'subscriptionFilters')
    
    def lambda_handler(event, context):
        """Write one CloudWatch Logs batch to S3 as one JSON line per log event."""
        batch = json.loads(gzip.decompress(base64.b64decode(event['awslogs']['data'])))
        if batch['messageType'] != 'DATA_MESSAGE':
            # CONTROL_MESSAGE: CloudWatch Logs checks that the destination is reachable.
            return
    
        first = batch['logEvents'][0]
        hour = datetime.fromtimestamp(first['timestamp'] / 1000, tz=timezone.utc)
        # The first event ID names the batch, so a redelivered batch maps to the same object.
        key = f"{PREFIX}/{hour:%Y/%m/%d/%H}/{first['id']}.ndjson"
        body = ''.join(split_batch(batch)).encode('utf-8')
        try:
            s3.put_object(Bucket=BUCKET, Key=key, Body=body,
                          ContentType='application/x-ndjson', IfNoneMatch='*')
        except ClientError as e:
            if e.response['Error']['Code'] != 'PreconditionFailed':
                raise
            print(f'{key} already exists, skipping the redelivered batch')
            return
        print(f"Wrote {len(batch['logEvents'])} events from {batch['logGroup']} to s3://{BUCKET}/{key}")
    
    def split_batch(batch):
        """Yield one CloudWatch Logs envelope per log event, as a JSON line."""
        envelope = {k: batch[k] for k in ENVELOPE_KEYS}
        for log_event in batch['logEvents']:
            yield json.dumps({**envelope, 'logEvents': [log_event]}, ensure_ascii=False) + '\n'
    
  6. Click Deploy.

  7. Go to Configuration > Environment variables > Edit.

  8. Click Add environment variable and add the following variables:

    • S3_BUCKET: rds-logs-secops
    • S3_PREFIX: rds-logs
  9. Click Save.

  10. Go to Configuration > General configuration > Edit.

  11. Provide the following configuration:

    • Memory: Enter 512 MB.
    • Timeout: Enter 1 min 0 sec.
  12. Click Save.

Allow CloudWatch Logs to invoke the function

  1. In the AWS Management Console, open AWS CloudShell from the top navigation bar in the same Region.
  2. Run the following command:

    aws lambda add-permission \
        --function-name rds-logs-splitter \
        --statement-id cloudwatch-logs-rds \
        --principal logs.amazonaws.com \
        --action lambda:InvokeFunction \
        --source-arn "arn:aws:logs:<AWS_REGION>:<AWS_ACCOUNT_ID>:log-group:/aws/rds/*" \
        --source-account <AWS_ACCOUNT_ID>
    
  3. Replace <AWS_REGION> and <AWS_ACCOUNT_ID> with your Region and account ID.

The permission covers every RDS log group in the account and Region, so you run the command once.

Create a subscription filter for each log group

Repeat these steps for every RDS log group that you want to ingest.

  1. In the AWS Management Console, search for and open CloudWatch.
  2. Go to Logs > Log groups.
  3. Select the RDS log group (for example, /aws/rds/instance/<DB_INSTANCE_ID>/audit).
  4. Click Actions > Subscription filters > Create Lambda subscription filter.
  5. Provide the following configuration:
    • Lambda function: Select rds-logs-splitter.
    • Log format: Select Other.
    • Subscription filter pattern: Leave empty to send all log events.
    • Subscription filter name: Enter rds-logs-to-secops.
  6. Click Start streaming.

Method 2: Amazon Data Firehose with Lambda transformation

The transformation function decompresses each CloudWatch Logs batch and splits it. When the split output doesn't fit into the 6 MB Lambda response limit, the function sends the events back to the stream in smaller batches, and they go through the function again like any new record. You can keep the default Firehose buffer settings.

Create the IAM role for the Lambda function

  1. In the AWS Management Console, search for and open IAM, and then go to Roles > Create role.
  2. Select AWS service as the Trusted entity type and Lambda as the Use case.
  3. Click Next.
  4. Search for and select the policy AWSLambdaBasicExecutionRole.
  5. Click Next.
  6. In the Role name field, enter RdsLogsFirehoseSplitterRole.
  7. Click Create role.
  8. Open the role RdsLogsFirehoseSplitterRole.
  9. Click Add permissions > Create inline policy.
  10. Select the JSON tab and paste the following policy:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": "firehose:PutRecordBatch",
                "Resource": "arn:aws:firehose:<AWS_REGION>:<AWS_ACCOUNT_ID>:deliverystream/rds-logs-to-secops"
            }
        ]
    }
    
  11. Replace <AWS_REGION> and <AWS_ACCOUNT_ID> with your Region (for example, us-east-1) and 12-digit account ID.

  12. Click Next.

  13. In the Policy name field, enter RdsLogsFirehoseReingest.

  14. Click Create policy.

Create the Lambda function

  1. In the AWS Management Console, search for and open Lambda, and then go to the Event Functions page.
  2. Click Create Event Function.
  3. Select Author from scratch and provide the following configuration:
    • Function name: Enter rds-logs-firehose-splitter.
    • Runtime: Select Python 3.14.
    • Execution role: Expand Change default execution role, select Use an existing role, and then select RdsLogsFirehoseSplitterRole.
  4. Click Create Event Function.
  5. On the Code tab, replace the content of lambda_function.py with the following code:

    import base64
    import gzip
    import json
    import time
    
    import boto3
    
    firehose = boto3.client('firehose')
    
    ENVELOPE_KEYS = ('messageType', 'owner', 'logGroup', 'logStream', 'subscriptionFilters')
    # A Lambda response can't exceed 6 MB. Keep a margin for the JSON around the records.
    MAX_RESPONSE_BYTES = 6_000_000
    # Split output size of one re-ingested batch. A Firehose record can't exceed 1,000 KiB.
    MAX_REINGEST_BYTES = 1_000_000
    # PutRecordBatch accepts up to 500 records and 4 MiB per call.
    MAX_PUT_RECORDS = 500
    MAX_PUT_BYTES = 4_000_000
    MAX_PUT_ATTEMPTS = 5
    
    def lambda_handler(event, context):
        """Split each CloudWatch Logs batch into one JSON line per log event."""
        stream_name = event['deliveryStreamArn'].split('/', 1)[1]
        output = []
        reingest = []
        response_size = 0
        for record in event['records']:
            batch = json.loads(gzip.decompress(base64.b64decode(record['data'])))
            if batch['messageType'] != 'DATA_MESSAGE':
                # CONTROL_MESSAGE: CloudWatch Logs checks that the destination is reachable.
                output.append(dropped(record))
                continue
    
            data = base64.b64encode(''.join(split_batch(batch)).encode('utf-8')).decode('ascii')
            entry_size = len(data) + len(record['recordId']) + 50
            if response_size + entry_size > MAX_RESPONSE_BYTES:
                # Too large for this response. Send the events back to the stream in smaller
                # batches; Firehose passes them through this function again.
                reingest.extend(rebatch(batch))
                output.append(dropped(record))
                continue
            response_size += entry_size
            output.append({'recordId': record['recordId'], 'result': 'Ok', 'data': data})
    
        if reingest:
            put_records(stream_name, reingest)
            print(f'Re-ingested {len(reingest)} smaller batches into {stream_name}')
        return {'records': output}
    
    def dropped(record):
        # Firehose requires the data field in every returned record, also for dropped ones.
        return {'recordId': record['recordId'], 'result': 'Dropped', 'data': ''}
    
    def split_batch(batch):
        """Yield one CloudWatch Logs envelope per log event, as a JSON line."""
        envelope = {k: batch[k] for k in ENVELOPE_KEYS}
        for log_event in batch['logEvents']:
            yield json.dumps({**envelope, 'logEvents': [log_event]}, ensure_ascii=False) + '\n'
    
    def rebatch(batch):
        """Return compressed CloudWatch Logs batches whose split output fits MAX_REINGEST_BYTES."""
        envelope = {k: batch[k] for k in ENVELOPE_KEYS}
        chunks = []
        events = []
        size = 0
        for log_event, line in zip(batch['logEvents'], split_batch(batch)):
            line_size = len(line.encode('utf-8'))
            if events and size + line_size > MAX_REINGEST_BYTES:
                chunks.append(events)
                events, size = [], 0
            events.append(log_event)
            size += line_size
        chunks.append(events)
        return [gzip.compress(json.dumps({**envelope, 'logEvents': c}).encode('utf-8')) for c in chunks]
    
    def put_records(stream_name, records):
        """Put records into the stream, retrying the ones that fail."""
        pending = records
        for attempt in range(MAX_PUT_ATTEMPTS):
            failed = []
            for group in put_groups(pending):
                response = firehose.put_record_batch(
                    DeliveryStreamName=stream_name, Records=[{'Data': data} for data in group])
                if response['FailedPutCount']:
                    failed.extend(data for data, result in zip(group, response['RequestResponses'])
                                  if 'ErrorCode' in result)
            if not failed:
                return
            pending = failed
            time.sleep(2 ** attempt)
        raise RuntimeError(f'{len(pending)} records could not be re-ingested into {stream_name}')
    
    def put_groups(records):
        """Group records within the PutRecordBatch limits."""
        group = []
        size = 0
        for data in records:
            if group and (len(group) == MAX_PUT_RECORDS or size + len(data) > MAX_PUT_BYTES):
                yield group
                group, size = [], 0
            group.append(data)
            size += len(data)
        if group:
            yield group
    
  6. Click Deploy.

  7. Go to Configuration > General configuration > Edit.

  8. Provide the following configuration:

    • Memory: Enter 512 MB.
    • Timeout: Enter 2 min 0 sec.
  9. Click Save.

Create the Amazon Data Firehose stream

  1. In the AWS Management Console, search for and open the Amazon Data Firehose console.
  2. Click Create Firehose stream.
  3. Under Choose source and destination, provide the following configuration:
    • Source: Select Direct PUT.
    • Destination: Select Amazon S3.
  4. In the Firehose stream name field, enter rds-logs-to-secops.
  5. Under Transform records:
    1. In the Transform source records with AWS Lambda section, select Enable data transformation.
    2. Choose the Lambda function rds-logs-firehose-splitter.
    3. Keep the default buffer size and buffer interval.
    4. Don't select Turn on decompression in the Decompress source records from Amazon CloudWatch Logs section. The function decompresses the records itself.
  6. Under Destination settings, provide the following configuration:
    • S3 bucket: Select the bucket rds-logs-secops.
    • New line delimiter: Keep Disabled. The function already ends every event with a new line.
    • S3 bucket prefix: Enter rds-logs/.
    • S3 bucket error output prefix: Enter firehose-errors/.
  7. Under Advanced settings, in the Service access section, select Create or update IAM role.
  8. Click Create Firehose stream.
  9. Wait until the stream Status is Active.

Create the IAM policy for CloudWatch Logs

  1. In the AWS Management Console, search for and open IAM, and then go to Policies > Create policy.
  2. Select the JSON tab and paste the following policy:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": "firehose:PutRecord",
                "Resource": "arn:aws:firehose:<AWS_REGION>:<AWS_ACCOUNT_ID>:deliverystream/rds-logs-to-secops"
            }
        ]
    }
    
  3. Replace <AWS_REGION> and <AWS_ACCOUNT_ID> with your Region and account ID.

  4. Click Next.

  5. In the Policy name field, enter RdsLogsToFirehosePolicy.

  6. Click Create policy.

Create the IAM role for CloudWatch Logs

  1. In the AWS Management Console, search for and open IAM, and then go to Roles > Create role.
  2. Select Custom trust policy and paste the following policy:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Principal": {
                    "Service": "logs.amazonaws.com"
                },
                "Action": "sts:AssumeRole",
                "Condition": {
                    "ArnLike": {
                        "aws:SourceArn": "arn:aws:logs:<AWS_REGION>:<AWS_ACCOUNT_ID>:*"
                    }
                }
            }
        ]
    }
    
  3. Replace <AWS_REGION> and <AWS_ACCOUNT_ID> with the same values as in the policy.

  4. Click Next.

  5. Search for and select the policy RdsLogsToFirehosePolicy.

  6. Click Next.

  7. In the Role name field, enter RdsLogsToFirehoseRole.

  8. Click Create role.

Create a subscription filter for each log group

Repeat these steps for every RDS log group that you want to ingest.

  1. In the AWS Management Console, search for and open CloudWatch.
  2. Go to Logs > Log groups.
  3. Select the RDS log group (for example, /aws/rds/instance/<DB_INSTANCE_ID>/audit).
  4. Click Actions > Subscription filters > Create Amazon Data Firehose subscription filter.
  5. Provide the following configuration:
    • Amazon Data Firehose stream: Select rds-logs-to-secops.
    • Select an existing role: Select RdsLogsToFirehoseRole.
    • Log format: Select Other.
    • Subscription filter pattern: Leave empty to send all log events.
    • Subscription filter name: Enter rds-logs-to-secops.
  6. Click Start streaming.

Create an IAM user for Google SecOps

Create the IAM policy

  1. In the AWS Management Console, search for and open IAM, and then go to Policies > Create policy.
  2. Select the JSON tab and paste the following policy:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "s3:GetObject",
                    "s3:ListBucket"
                ],
                "Resource": [
                    "arn:aws:s3:::rds-logs-secops",
                    "arn:aws:s3:::rds-logs-secops/*"
                ]
            },
            {
                "Effect": "Allow",
                "Action": [
                    "sqs:ReceiveMessage",
                    "sqs:DeleteMessage",
                    "sqs:ChangeMessageVisibility"
                ],
                "Resource": "arn:aws:sqs:<AWS_REGION>:<AWS_ACCOUNT_ID>:rds-logs-secops"
            }
        ]
    }
    
  3. Replace <AWS_REGION> and <AWS_ACCOUNT_ID> with your Region and account ID.

    • If you use the Amazon S3 V2 feed, remove the second statement (the SQS permissions).
    • If you plan to let the feed delete files after transfer, add s3:DeleteObject to the first statement.
  4. Click Next.

  5. In the Policy name field, enter SecOpsRdsLogsReadPolicy.

  6. Click Create policy.

Create the user and access key

  1. In the AWS Management Console, search for and open IAM, and then go to Users > Create user.
  2. In the User name field, enter secops-rds-logs-reader.
  3. Click Next.
  4. Select Attach policies directly.
  5. Search for and select the policy SecOpsRdsLogsReadPolicy.
  6. Click Next.
  7. Click Create user.
  8. Select the user secops-rds-logs-reader.
  9. Select the Security credentials tab.
  10. In the Access keys section, click Create access key.
  11. Select Third-party service as the Use case.
  12. If prompted, select the confirmation checkbox.
  13. Click Next.
  14. Click Create access key.
  15. Click Download .csv file to save the Access key and Secret access key.
  16. Click Done.

Configure a feed in Google SecOps to ingest AWS RDS logs

  1. Go to Settings > Data Management > Feeds. If you are on a SIEM-only platform, go to Settings > Feeds.
  2. Click Add New Feed.
  3. On the next page, click Configure a single feed.
  4. In the Feed name field, enter a name for the feed (for example, AWS RDS logs).
  5. Select Amazon SQS V2 or Amazon S3 V2 as the Source type.
  6. Select AWS RDS as the Log type.
  7. Click Next.
  8. Specify values for the following input parameters.

    Amazon SQS V2:

    • Queue Name: The queue ARN (for example, arn:aws:sqs:us-east-1:123456789012:rds-logs-secops).
    • S3 URI: s3://rds-logs-secops/rds-logs/
    • Source deletion option: Select the deletion option according to your preference.
    • Maximum File Age: Include files modified in the last number of days (default is 180 days).
    • SQS Queue Access Key ID: The access key of the user secops-rds-logs-reader.
    • SQS Queue Secret Access Key: The secret access key of the user secops-rds-logs-reader.
    • Asset namespace: The asset namespace.
    • Ingestion labels: The label to be applied to the events from this feed.

    Amazon S3 V2:

    • S3 URI: s3://rds-logs-secops/rds-logs/
    • Source deletion option: Select the deletion option according to your preference.
    • Maximum File Age: Include files modified in the last number of days (default is 180 days).
    • Access Key ID: The access key of the user secops-rds-logs-reader.
    • Secret Access Key: The secret access key of the user secops-rds-logs-reader.
    • Asset namespace: The asset namespace.
    • Ingestion labels: The label to be applied to the events from this feed.
  9. Click Next.

  10. Review your new feed configuration in the Finalize screen, and then click Submit.

UDM mapping table

Log Field UDM Mapping Logic
attemptEndingTimestamp_label additional.fields Merged
attemptsMade_label additional.fields Merged
connection_label additional.fields Merged
raw_data_label additional.fields Merged
rowCount_label additional.fields Merged
substatementId_label additional.fields Merged
type_label additional.fields Merged
descrip metadata.description Directly mapped
description metadata.description Directly mapped
valData.class metadata.description Directly mapped
arrivalTimestamp metadata.event_timestamp Parsed as UNIX_MS
date_data metadata.event_timestamp Parsed as TIMESTAMP_ISO8601
time metadata.event_timestamp Parsed as yyyy-MM-dd HH:mm:ss
time_unix metadata.event_timestamp Parsed as UNIX
timestamp metadata.event_timestamp Parsed as UNIX
ts metadata.event_timestamp Parsed as RFC3339
event_type metadata.event_type Directly mapped
has_principal metadata.event_type Mapped: true → NETWORK_CONNECTION, true → STATUS_UPDATE
has_principal_user metadata.event_type Mapped: true → USER_UNCATEGORIZED
prod_event_type metadata.product_event_type Directly mapped
Id metadata.product_log_id Directly mapped
log_id metadata.product_log_id Directly mapped
logevent.id metadata.product_log_id Directly mapped
valData.statementId metadata.product_log_id Directly mapped
PROTOCOL network.ip_protocol Mapped: tcp → TCP
valData.sessionId network.session_id Directly mapped
app_id principal.application Directly mapped
valData.serviceName principal.application Directly mapped
src_hostname principal.asset.hostname Directly mapped
valData.dbUserName principal.asset.hostname Directly mapped
HOST principal.asset.ip Merged
client_ip principal.asset.ip Merged
remoteHost principal.asset.ip Merged
source_ip principal.asset.ip Merged
src_ip principal.asset.ip Merged
src_hostname principal.hostname Directly mapped
valData.dbUserName principal.hostname Directly mapped
HOST principal.ip Merged
client_ip principal.ip Merged
remoteHost principal.ip Merged
source_ip principal.ip Merged
src_ip principal.ip Merged
prin_namespace principal.namespace Directly mapped
valData.serverVersion principal.platform_version Directly mapped
PORT principal.port Directly mapped
src_port principal.port Directly mapped
valData.remotePort principal.port Renamed/mapped
pid principal.process.pid Directly mapped
valData.pid principal.process.pid Directly mapped
lambdaARN principal.resource.name Directly mapped
valData.databaseName principal.resource.name Directly mapped
user_name principal.user.user_display_name Directly mapped
msg.owner principal.user.userid Directly mapped
src_user principal.user.userid Directly mapped
_sec_result security_result Merged
secu_result security_result Merged
errorMessage security_result.description Directly mapped
valData.command security_result.description Directly mapped
exitCode_label security_result.detection_fields Merged
errorCode security_result.summary Directly mapped
valData.errorMessage security_result.summary Directly mapped
valData.clientApplication target.application Directly mapped
HOST target.asset.hostname Directly mapped
tar_host target.asset.hostname Directly mapped
serverHost target.asset.ip Merged
tar_ip target.asset.ip Merged
HOST target.hostname Directly mapped
tar_host target.hostname Directly mapped
serverHost target.ip Merged
tar_ip target.ip Merged
cmdText target.process.command_line Directly mapped
SID_label target.resource.attribute.labels Merged
objectName_label target.resource.attribute.labels Merged
objectType_label target.resource.attribute.labels Merged
PROGRAM target.resource.name Directly mapped
arn target.resource.name Directly mapped
database_name target.resource.name Directly mapped
resource_name target.resource.name Directly mapped
valData.serverType target.resource.name Directly mapped
valData.dbProtocol target.resource.resource_subtype Directly mapped
USER target.user.userid Directly mapped
N/A metadata.event_type Constant: NETWORK_CONNECTION
N/A metadata.log_type Constant: AWS_RDS
N/A metadata.product_name Constant: AWS_RDS
N/A metadata.vendor_name Constant: AWS_RDS
N/A network.ip_protocol Constant: TCP
N/A target.resource.type Constant: DATABASE

Change Log

View the Change Log for this parser

Need more help? Get answers from Community members and Google SecOps professionals.