databaseActivityEventList JSON array for database activity streams
The audit log payload is an encrypted databaseActivityEventList
JSON array. The following tables lists alphabetically the
fields for each activity event in the decrypted DatabaseActivityEventList
array of an audit log.
The fields differ depending on whether you use Aurora PostgreSQL or Aurora MySQL. Consult
the table that applies to your database engine.
Important
The event structure is subject to change. Aurora might add new fields to activity events in the future. In applications that parse the JSON data, make sure that your code can ignore or take appropriate actions for unknown field names.
databaseActivityEventList fields for Aurora PostgreSQL
The following are databaseActivityEventList
fields for Aurora PostgreSQL.
Field | Data Type | Description |
---|---|---|
class |
string |
The class of activity event. Valid values for Aurora PostgreSQL are the following:
|
clientApplication |
string | The application the client used to connect as reported by the client. The client doesn't have to provide this information, so the value can be null. |
command |
string | The name of the SQL command without any command details. |
commandText |
string |
The actual SQL statement passed in by the user. For Aurora PostgreSQL, the value is identical to the original SQL statement. This field is used for all types of records except for connect or disconnect records, in which case the value is null. ImportantThe full SQL text of each statement is visible in the activity stream audit log, including any sensitive data. However, database user passwords are redacted if Aurora can determine them from the context, such as in the following SQL statement.
|
databaseName |
string | The database to which the user connected. |
dbProtocol |
string | The database protocol, for example Postgres 3.0 . |
dbUserName |
string | The database user with which the client authenticated. |
errorMessage (version 1.1 database activity records only) |
string |
If there was any error, this field is populated with the error message that
would've been generated by the DB server. The An error is defined as any activity that would produce a client-visible
PostgreSQL error log event at a severity level of Internal PostgreSQL server errors such as background checkpointer process errors do not generate an error message. However, records for such events are still emitted regardless of the setting of the log severity level. This prevents attackers from turning off logging to attempt avoiding detection. See also the |
exitCode |
int | A value used for a session exit record. On a clean exit, this contains the
exit code. An exit code can't always be obtained in some failure scenarios.
Examples are if PostgreSQL does an exit() or if an operator performs
a command such as kill -9 .If there was any error, the
See also the
|
logTime |
string | A timestamp as recorded in the auditing code path. This represents the SQL statement execution end
time. See also the startTime field. |
netProtocol |
string | The network communication protocol. |
objectName |
string | The name of the database object if the SQL statement is operating on one. This field is used only where the SQL statement operates on a database object. If the SQL statement is not operating on an object, this value is null. |
objectType |
string | The database object type such as table, index, view, and so on. This field is used only where the SQL
statement operates on a database object. If the SQL statement is not operating on an object, this value is
null. Valid values include the following:
|
paramList |
string | An array of comma-separated parameters passed to the SQL statement. If the SQL statement has no parameters, this value is an empty array. |
pid |
int | The process ID of the backend process that is allocated for serving the client connection. |
remoteHost |
string | Either the client IP address or hostname. For Aurora PostgreSQL, which one is used depends on the
database's log_hostname parameter setting. The remoteHost value also includes [local] and localhost
which indicate activity from the rdsadmin user. |
remotePort |
string | The client port number. |
rowCount |
int | The number of rows returned by the SQL statement. For example, if a SELECT statement returns 10 rows, rowCount is 10. For INSERT or UPDATE statements, rowCount is 0. |
serverHost |
string | The database server host IP address. The serverHost value also includes [local] and localhost
which indicate activity from the rdsadmin user. |
serverType |
string | The database server type, for example PostgreSQL . |
serverVersion |
string | The database server version, for example 2.3.1 for Aurora PostgreSQL. |
serviceName |
string | The name of the service, for example Amazon Aurora PostgreSQL-Compatible edition .
|
sessionId |
int | A pseudo-unique session identifier. |
sessionId |
int | A pseudo-unique session identifier. |
startTime (version 1.1 database activity records only) |
string |
The time when execution began for the SQL statement. To calculate the approximate execution time of the SQL statement, use
|
statementId |
int | An identifier for the client's SQL statement. The counter is at the session level and increments with each SQL statement entered by the client. |
substatementId |
int | An identifier for a SQL substatement. This value counts the contained substatements for each SQL
statement identified by the statementId field. |
type |
string | The event type. Valid values are record or heartbeat . |
databaseActivityEventList fields for Aurora MySQL
The following are databaseActivityEventList
fields for Aurora MySQL.
Field | Data Type | Description |
---|---|---|
class |
string |
The class of activity event. Valid values for Aurora MySQL are the following:
|
clientApplication |
string | The application the client used to connect as reported by the client. The client doesn't have to provide this information, so the value can be null. |
command |
string |
The general category of the SQL statement. The values for this field depend on the value of
The values when
The values when
|
commandText |
string |
For events with a For events with a For Aurora MySQL, characters such as quotation marks are preceded by a backslash, representing an escape character. ImportantThe full SQL text of each statement is visible in the audit log, including any sensitive data. However, database user passwords are redacted if Aurora can determine them from the context, such as in the following SQL statement.
NoteSpecify a password other than the prompt shown here as a security best practice. |
databaseName |
string | The database to which the user connected. |
dbProtocol |
string | The database protocol. Currently, this value is always MySQL for Aurora MySQL. |
dbUserName |
string | The database user with which the client authenticated. |
endTime (version 1.2 database activity records only) |
string |
The time when execution ended for the SQL statement. It is represented in Coordinated Universal Time (UTC) format. To calculate the execution time of the SQL statement, use
|
errorMessage (version 1.1 database activity records only) |
string |
If there was any error, this field is populated with the error message that
would've been generated by the DB server. The An error is defined as any activity that would produce a client-visible
MySQL error log event at a severity level of Internal MySQL server errors such as background checkpointer process errors do not generate an error message. However, records for such events are still emitted regardless of the setting of the log severity level. This prevents attackers from turning off logging to attempt avoiding detection. See also the |
exitCode |
int | A value used for a session exit record. On a clean exit, this contains the exit code. An exit code can't always be obtained in some failure scenarios. In such cases, this value might be zero or might be blank. |
logTime |
string | A timestamp as recorded in the auditing code path. It is represented in Coordinated Universal Time
(UTC) format. For the most accurate way to calculate statement duration, see the startTime and
endTime fields. |
netProtocol |
string | The network communication protocol. Currently, this value is always TCP for
Aurora MySQL. |
objectName |
string | The name of the database object if the SQL statement is operating on one. This field is used only
where the SQL statement operates on a database object. If the SQL statement isn't operating on an
object, this value is blank. To construct the fully qualified name of the object, combine
databaseName and objectName . If the query involves multiple objects, this field
can be a comma-separated list of names. |
objectType |
string |
The database object type such as table, index, and so on. This field is used only where the SQL statement operates on a database object. If the SQL statement is not operating on an object, this value is null. Valid values for Aurora MySQL include the following:
|
paramList |
string | This field isn't used for Aurora MySQL and is always null. |
pid |
int | The process ID of the backend process that is allocated for serving the client connection. When the
database server is restarted, the pid changes and the counter for the statementId
field starts over. |
remoteHost |
string | Either the IP address or hostname of the client that issued the SQL statement. For Aurora MySQL, which
one is used depends on the database's skip_name_resolve parameter setting. The value
localhost indicates activity from the rdsadmin special user. |
remotePort |
string | The client port number. |
rowCount |
int | The number of table rows affected or retrieved by the SQL statement. This field is used only for SQL statements that are data manipulation language (DML) statements. If the SQL statement is not a DML statement, this value is null. |
serverHost |
string | The database server instance identifier. |
serverType |
string | The database server type, for example MySQL . |
serverVersion |
string | The database server version. Currently, this value is always MySQL 5.7.12 for
Aurora MySQL. |
serviceName |
string | The name of the service. Currently, this value is always Amazon Aurora MySQL for
Aurora MySQL. |
sessionId |
int | A pseudo-unique session identifier. |
startTime (version 1.1 database activity records only) |
string |
The time when execution began for the SQL statement. It is represented in Coordinated Universal Time (UTC) format. To calculate the execution time of the SQL statement, use
|
statementId |
int | An identifier for the client's SQL statement. The counter increments with each SQL statement entered by the client. The counter is reset when the DB instance is restarted. |
substatementId |
int | An identifier for a SQL substatement. This value is 1 for events with class MAIN and 2
for events with class AUX . Use the statementId field to identify all the events
generated by the same statement. |
transactionId (version 1.2 database activity records only) |
int | An identifier for a transaction. |
type |
string | The event type. Valid values are record or heartbeat . |