Amazon Simple Storage Service (Amazon S3) provides a simple web services interface that can be used to store and retrieve any amount of data from anywhere on the web. Add an Amazon S3 Source to upload messages to Sumo Logic.
One Amazon S3 Source can collect data from just a single S3 bucket. However, you can configure multiple S3 Sources to collect from one S3 bucket. For example, you could use one S3 Source to collect one particular data type, and then configure another S3 Source to collect another data type.
For more information, see Request Rate and Performance Considerations.
An S3 Source can collect either plain text or gzip-compressed text. Data is treated as plain text by default, but gzip decompression will be used if both of the following conditions apply:
- The target file has a .gz or .gzip extension, or no file extension.
- The target file's initial bytes match the gzip file format.
Configure an Amazon S3 Source
- Grant Sumo Logic access to an Amazon S3 bucket.
- Enable logging in AWS using the Amazon Console.
- Confirm that logs are being delivered to the Amazon S3 bucket.
- Add an AWS Source for the S3 Source to Sumo Logic. See below for details.
These configuration instructions apply to log collection from all AWS Source types. Select the correct Source type your specific Source in Step 3. For instructions on collecting CloudWatch metrics from Amazon, see Amazon CloudWatch Source for Metrics.
- In Sumo Logic select Manage Data > Collection > Collection (Manage > Collection in the classic UI).
- On the Collectors page, click Add Source next to a hosted collector, either an existing hosted collector, or one you have created for this purpose.
- Select your AWS Source type.
- Enter a name to display for the new Source. Description is optional.
- For Bucket Name, enter the exact name of your organization's S3 bucket.
Be sure to double-check the name as it appears in AWS, for example:
- For Path Expression, enter the string that matches the S3 objects you'd like to collect. A wildcard (*) can be used in this string. (Do NOT use a leading forward slash. See About Amazon Path Expressions for details). Remember that recursive path expressions use a single wild card.
- Collection should begin. Select a collection start time from the menu, or select All Time to collect all logs.
- For Source Category, enter any string to tag the output collected from this Source. (Category metadata is stored in a searchable field called _sourceCategory.)
- For Key ID, enter the AWS Access Key ID number granted to Sumo Logic. (See Granting access to an S3 bucket for more information.)
- For Secret Key, enter the AWS Secret Access Key Sumo Logic should use to access the S3 bucket. (See Granting access to an S3 bucket for more information.)
- For Scan Interval, use the default of 5 minutes. Alternately, enter the frequency Sumo Logic will scan your S3 bucket for new data. To learn more about Scan Interval considerations, see About setting the S3 Scan Interval.
- Set any of the following under Advanced:
- Enable Timestamp Parsing. This option is selected by default. If it's deselected, no timestamp information is parsed at all.
- Time Zone. There are two options for Time Zone. You can use the time zone present in your log files, and then choose an option in case time zone information is missing from a log message. Or, you can have Sumo Logic completely disregard any time zone information present in logs by forcing a time zone. It's very important to have the proper time zone set, no matter which option you choose. If the time zone of logs can't be determined, Sumo Logic assigns logs UTC; if the rest of your logs are from another time zone your search results will be affected.
- Timestamp Format. By default, Sumo Logic will automatically detect the timestamp format of your logs. However, you can manually specify a timestamp format for a Source. See Timestamps, Time Zones, Time Ranges, and Date Formats for more information.
- Enable Multiline Processing. Multiline processing is enabled by default. Use this option if you're working with multi-line messages (for example, log4J or exception stack traces). Deselect this option if you want to avoid unnecessary processing when collecting single-message-per-line files (for example, Linux system.log).
- Infer Boundaries. Enable when you want Sumo Logic to automatically attempt to determine which lines belong to the same message.
If you deselect the Infer Boundaries option, you will need to enter a regular expression in the Boundary Regex field to use for detecting the entire first line of multi-line messages.
- Boundary Regex. You can specify the boundary between messages using a regular expression. Enter a regular expression for the full first line of every multi-line message in your log files. For an example, see the Define Boundary Regex topic.
- Create any Processing Rules you'd like for the AWS Source.
- When you are finished configuring the Source click Save.