Create a log-group level field index policy
Use the steps in this section to create a field index policy that applies to a single log group.
To create a log-group level field index policy
Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/
. In the left navigation pane, choose Logs, Log groups.
Choose the name of the log group.
Choose the Field indexes tab.
Choose Manage field indexes for this log group
For Manage log group level field indexes, choose Add field path to enter the first field to index.
Then enter the string to use as the value of the field name. This must be an exact case match to what appears in the log events. For example, if your log events include
requestId
, you must enterrequestId
here.RequestId
,requestID
, andrequest Id
would not match.If you want to index a custom log field that starts with the
@
character, you must include an extra@
character when you enter the index string. For example, if you have a custom log field@emailname
, enter@@emailname
in the Add field path box.You can also create indexes for the
@ingestionTime
and@logStream
fields that CloudWatch Logs automatically generates. If you do, do not need to add an extra@
when specifying them.Repeat the previous step to add as many as 20 field indexes.
When you have finished, choose Save.