---
title: "AWS S3 Logs Input"
description: "read log events from a single AWS S3 object"
source: "https://github.com/log-10x/modules/tree/main/pipelines/run/modules/input/analyzer/s3Logs/module.yaml"
icon: "material/bucket-outline"

---
The S3 Logs module enables reading log and trace events from a single [AWS S3](https://aws.amazon.com/s3/){target="\_blank"} object for analysis and transformation into [TenXObjects](https://doc.log10x.com/api/js/#TenXObject "Provide structured, reflective access to log/trace events read from input(s).").

### :material-hammer-wrench: How It Works

The S3 Logs input fetches a single S3 object by key using the [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html){target="\_blank"} API. The object's line-delimited content is then split into individual events for processing.

```mermaid
graph LR
    A["Timer<br/>Trigger"] --> B["GetObject<br/>API"]
    B --> C["Stream<br/>Content"]
    C --> D["Split by<br/>Newlines"]
    D --> E["Transform to<br/>TenXObjects"]
    E --> F["Close<br/>Route"]

    classDef trigger fill:#2563eb88,stroke:#1d4ed8,color:#ffffff
    classDef api fill:#ea580c88,stroke:#c2410c,color:#ffffff
    classDef process fill:#05966988,stroke:#047857,color:#ffffff

    class A trigger
    class B api
    class C,D,E process
    class F trigger
```

### :material-key: Authentication

The module supports the [AWS default credential provider chain](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html){target="\_blank"}:

1. Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)
2. Java system properties
3. Web identity token (for EKS/IRSA)
4. Shared credentials file (`~/.aws/credentials`)
5. ECS container credentials
6. EC2 instance profile credentials

Explicit credentials can also be provided via configuration:

```yaml
s3Logs:
  - name: MyS3LogsInput
    bucket: my-bucket
    key: logs/app.log
    awsAccessKeyID: AKIAIOSFODNN7EXAMPLE
    awsSecretKey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
```

### :material-speedometer: Backpressure Controls

Control resource usage with backpressure options:

|Option|Description|Default|
|---|---|---|
|`totalBytesLimit`|Max bytes to read|50MB|
|`totalEventsLimit`|Max events to read|10000|
|`totalDuration`|Max time to keep input open|5min|

### :material-code-tags: Example Configuration

```yaml
tenx: run

include: run/modules/input/analyzer/s3Logs

s3Logs:
  - name: ProductionLogs
    bucket: my-company-logs
    key: logs/2024/01/15/application.log
    awsRegion: us-west-2
    totalBytesLimit: $=parseBytes("100MB")
    totalEventsLimit: 50000
    printProgress: true
```

### :material-link-variant: Related Modules

- [CloudWatch Logs Input](https://doc.log10x.com/run/input/analyzer/cloudwatchLogs/ "Read events from AWS CloudWatch Logs") - Read from CloudWatch Logs
- [Object Storage Query](https://doc.log10x.com/run/input/objectStorage/query/ "Query an object storage container for events matching target criteria") - Query-based object storage access

## :material-wrench-outline: Config Files

To configure the AWS S3 Logs input module, [:material-cog: Edit](https://doc.log10x.com/config/app/#module-config "Learn how to edit app and module configurations") these files.  

Below is the default configuration from: [s3Logs/config.yaml](https://github.dev/log-10x/config/blob/main/pipelines/run/input/analyzer/s3Logs/config.yaml "s3Logs/config.yaml"){target="\_blank"} (<span class="tenx-tooltip" data-tooltip="The config file below contains required fields to activate this module, marked with &#10071;">** Required Fields*</span>).  
  
<div class="edit-options">
    <a class="md-button tenx-edit-online-button" data-tooltip="Edit online on github.dev" href="https://github.dev/log-10x/config/blob/main/pipelines/run/input/analyzer/s3Logs/config.yaml" target="_blank" rel="noopener noreferrer">
        <span class="twemoji" style="margin-right: 0.3rem;">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
            </svg>
        </span> Edit Online
    </a>
    <button class="md-button tenx-config.yaml0-edit-button" data-tooltip="Edit configuration file" data-dialog-id="config-yaml0-dialog">
        <span style="margin-right: 0.3rem;">
            <span class="twemoji">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                    <path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"></path>
                </svg>
            </span>
        </span>Edit Locally
    </button>
</div>

<dialog id="config-yaml0-dialog" class="md-dialog md-dialog--editor">
    <div class="editor-dialog-wrapper">
        <div class="editor-dialog-header">
            <span class="editor-dialog-title">Edit config.yaml Locally</span>
            <div class="editor-header-actions">
                <button class="editor-toolbar-btn yaml-editor-locations" data-tooltip="Save">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5 20h14v-2H5v2m14-9h-4V3H9v8H5l7 7 7-7Z"></path></svg>
                </button>
                <button class="editor-toolbar-btn yaml-editor-reset" data-tooltip="Reset to default">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path></svg>
                </button>
                <button class="editor-toolbar-btn yaml-editor-copy" data-tooltip="Copy to clipboard">
                    <svg class="icon-copy" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path></svg>
                    <svg class="icon-check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="display:none;"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg>
                </button>
                <span class="header-divider"></span>
                <button class="editor-toolbar-btn yaml-editor-fullscreen" data-tooltip="Fullscreen">
                    <svg class="icon-maximize" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z"></path></svg>
                    <svg class="icon-minimize" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="display:none;"><path fill="currentColor" d="M5,16H8V19H10V14H5V16M14,14V19H16V16H19V14H14M16,5V8H19V10H14V5H16M10,5V10H5V8H8V5H10Z"></path></svg>
                </button>
                <span class="header-divider"></span>
                <button class="editor-toolbar-btn editor-dialog-close" onclick="closeDialog('config-yaml0-dialog')" data-tooltip="Close">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg>
                </button>
            </div>
        </div>
        <div class="editor-dialog-content">
            <div class="yaml-editor-container"></div>
        </div>
        <div class="yaml-editor-statusbar">
            <span class="yaml-editor-status"></span>
        </div>
    </div>
    <!-- Locations Popup -->
    <div class="locations-popup" style="display: none;">
        <div class="locations-popup-content">
            <div class="locations-popup-header">
                <span class="locations-header-label">Download and save to:</span>
                <button class="locations-popup-close" aria-label="Close">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
                        <path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                    </svg>
                </button>
            </div>
            <ul class="locations-list">
                <li>
                    <span class="location-label">Linux / Docker / macOS
                        <span class="help-icon" data-tooltip="Default system location. The engine automatically reads configs from here at startup. Best for production deployments.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="default-path location-path" data-tooltip=""
                            data-copy-osx="/etc/log10x/config/run/input/analyzer/s3Logs/config.yaml"
                            data-copy-nix="/etc/log10x/config/run/input/analyzer/s3Logs/config.yaml"
                            data-copy-win="C:\log10x\configs/run/input/analyzer/s3Logs/config.yaml"></code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
                <li>
                    <span class="location-label">Custom directory
                        <span class="help-icon" data-tooltip="Set TENX_CONFIG environment variable to point to a custom config directory. Useful when you want configs in a non-standard location.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="location-path" data-tooltip="$TENX_CONFIG/run/input/analyzer/s3Logs/config.yaml">$TENX_CONFIG/run/input/analyzer/s3Logs/config.yaml</code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
                <li>
                    <span class="location-label">Within cloned repo
                        <span class="help-icon" data-tooltip="First run: git clone github.com/log-10x/config. Then save the file to this path within the cloned folder. Use for version control.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="location-path" data-tooltip="./pipelines/run/input/analyzer/s3Logs/config.yaml">./pipelines/run/input/analyzer/s3Logs/config.yaml</code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
            </ul>
            <div class="locations-popup-footer">
                <button class="locations-download-btn" title="Download config file">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                        <path fill="currentColor" d="M5 20h14v-2H5v2m14-9h-4V3H9v8H5l7 7 7-7Z"></path>
                    </svg>
                    <span>Download</span>
                </button>
            </div>
        </div>
    </div>
</dialog>

<template class="tenx-config-schema" data-encoding="base64">ewogICJ0eXBlIiA6ICJvYmplY3QiLAogICJwcm9wZXJ0aWVzIiA6IHsKICAgICJpbmNsdWRlIiA6IHsKICAgICAgInR5cGUiIDogInN0cmluZyIKICAgIH0sCiAgICAidGVueCIgOiB7CiAgICAgICJ0eXBlIiA6ICJzdHJpbmciCiAgICB9LAogICAgInMzTG9ncyIgOiB7CiAgICAgICJ0eXBlIiA6ICJhcnJheSIsCiAgICAgICJpdGVtcyIgOiB7CiAgICAgICAgInR5cGUiIDogIm9iamVjdCIsCiAgICAgICAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiA6IGZhbHNlLAogICAgICAgICJwcm9wZXJ0aWVzIiA6IHsKICAgICAgICAgICJuYW1lIiA6IHsKICAgICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAgICJzdHJpbmciLAogICAgICAgICAgICAgICJudWxsIgogICAgICAgICAgICBdLAogICAgICAgICAgICAibWFya2Rvd25EZXNjcmlwdGlvbiIgOiAiTG9naWNhb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G9nIGBgYCIKICAgICAgICAgIH0sCiAgICAgICAgICAidG90YWxCeXRlc0xpbWl0IiA6IHsKICAgICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAgICJzdHJpbmciLAogICAgICAgICAgICAgICJudWxsIgogICAgICAgICAgICBdLAogICAgICAgICAgICAibWFya2Rvd25EZXNjcmlwdGlvbiIgOiAiTWF4aW11bSB0b3RhbCBieXRlcyB0byByZWFkIGZyb20gaW5wdXQgYmVmb3JlIGNsb3NpbmdcblxuU2V0cyB0aGUgbWF4aW11bSBudW1iZXIgb2YgYnl0ZXMgYSB0YXJnZXQgcGlwZWxpbmUgaW5wdXQgd2lsbCByZWFkIGludG8gdGhlIHBpcGVsaW5lLiBUaGlzIHZhbHVlIGxpbWl0cyB0aGUgdm9sdW1lIG9mIGV2ZW50cyB0byByZWFkIGZyb20gdGhlIFMzIG9iamVjdC4gIEZvciBleGFtcGxlOiBgYGAgeWFtbCBzM0xvZ3NUb3RhbEJ5dGVzTGltaXQ6ICQ9cGFyc2VCeXRlcyhcIjFHQlwiKSBgYGAiCiAgICAgICAgICB9LAogICAgICAgICAgInRvdGFsRXZlbnRzTGltaXQiIDogewogICAgICAgICAgICAidHlwZSIgOiBbCiAgICAgICAgICAgICAgInN0cmluZyIsCiAgICAgICAgICAgICAgIm51bWJlciIsCiAgICAgICAgICAgICAgIm51bGwiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJtYXJrZG93bkRlc2NyaXB0aW9uIiA6ICJNYXhpbXVtIHRvdGFsIGV2ZW50cyB0byByZWFkIGZyb20gaW5wdXQgYmVmb3JlIGNsb3NpbmdcblxuU2V0cyB0aGUgbWF4aW11bSBudW1iZXIgb2YgZXZlbnRzIGEgdGFyZ2V0IHBpcGVsaW5lIGlucHV0IHdpbGwgcmVhZCBpbnRvIHRoZSBwaXBlbGluZS4gVGhpcyB2YWx1ZSBsaW1pdHMgdGhlIHZvbHVtZSBvZiBldmVudHMgdG8gcmVhZCBmcm9tIHRoZSBTMyBvYmplY3QuIChEZWZhdWx0OiAxMDAwMCkiLAogICAgICAgICAgICAiZGVmYXVsdCIgOiAiMTAwMDAiCiAgICAgICAgICB9LAogICAgICAgICAgInRvdGFsRHVyYXRpb24iIDogewogICAgICAgICAgICAidHlwZSIgOiBbCiAgICAgICAgICAgICAgInN0cmluZyIsCiAgICAgICAgICAgICAgIm51bGwiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJtYXJrZG93bkRlc2NyaXB0aW9uIiA6ICJNYXhpbXVtIGR1cmF0aW9uIHRvIGtlZXAgaW5wdXQgb3BlbiBiZWZvcmUgY2xvc2luZ1xuXG5TZXRzIHRoZSBtYXhpbXVtIGR1cmF0aW9uIGEgdGFyZ2V0IHBpcGVsaW5lIGlucHV0IHdpbGwgcmVtYWluIG9wZW4uIFdoZW4gcmVhY2hlZCwgdGhlIGlucHV0IHdpbGwgY2xvc2UgYW5kIG5vIG1vcmUgZGF0YSB3aWxsIGJlIHJlYWQuICBGb3IgZXhhbXBsZTogYGBgIHlhbWwgczNMb2dzVG90YWxEdXJhdGlvbjogJD1wYXJzZUR1cmF0aW9uKFwiMTBtaW5cIikgYGBgIChEZWZhdWx0OiBwYXJzZUR1cmF0aW9uKFwiNW1pblwiKSkiLAogICAgICAgICAgICAiZGVmYXVsdCIgOiAicGFyc2VEdXJhdGlvbihcIjVtaW5cIikiCiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAicmVxdWlyZWQiIDogWwogICAgICAgICAgIm5hbWUiLAogICAgICAgICAgImJ1Y2tldCIsCiAgICAgICAgICAia2V5IgogICAgICAgIF0KICAgICAgfQogICAgfQogIH0sCiAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiA6IHRydWUKfQ==</template>

```yaml
# 'run' AWS S3 Logs input configuration

# Configure an AWS S3 Logs event input to read a single S3 object
# To learn more see https://doc.log10x.com/run/input/analyzer/s3Logs/

# Set the 10x pipeline to 'run'
tenx: run

# =============================== Dependencies ================================

include: run/modules/input/analyzer/s3Logs

# ============================== S3 Logs Options ==============================

# Multiple S3 Logs inputs can be defined below
s3Logs:

    # 'name' sets a unique logical name across all pipeline inputs
  - name: S3LogsInput

    # --------------------------- Connection Options --------------------------

    # 'awsAccessKeyID' sets the AWS access key (e.g. 'AKIAIOSFODNN7EXAMPLE')
    #  To learn more see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
    awsAccessKeyID: $=TenXEnv.get("AWS_ACCESS_KEY_ID") # (EnvVar or default credential chain)

    # 'awsSecretKey' sets the AWS access secret key  (e.g. 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY')
    #  To learn more see: https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html
    awsSecretKey: $=TenXEnv.get("AWS_SECRET_ACCESS_KEY") # (EnvVar or default credential chain)

    # 'awsRegion' sets the region hosting the S3 bucket
    #  To learn more see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
    awsRegion: $=TenXEnv.get("AWS_DEFAULT_REGION", "us-east-1")

    # ---------------------------- S3 Object Options ---------------------------

    # 'bucket' sets the S3 bucket name (e.g., 'my-log-bucket').
    #  To learn more see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
    bucket: "" # (❗ REQUIRED)

    # 'key' sets the S3 object key to fetch (e.g., 'logs/app.log').
    #  To learn more see: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
    key: "" # (❗ REQUIRED)

    # --------------------------- Backpressure Options -----------------------

    # 'totalDuration' sets the max duration to try reading from the remote input
    totalDuration: $=parseDuration("5min")

    # 'totalBytesLimit' sets the max total bytes to read from the remote input
    totalBytesLimit: $=parseBytes("50MB")

    # 'totalEventsLimit' sets the max number of events to read the remote input
    totalEventsLimit: 10000

    # --------------------------- Ancillary Options ---------------------------

    # 'printProgress' controls whether to print a gauge to the console
    #  This option helps debug and test the input
    printProgress: $=!TenXEnv.get("quiet")
```

## :material-menu: Options

Specify the options below to [configure](/config "configure") multiple AWS S3 Logs input:

|Name|Description|Category|
|---|---|---|
|[s3LogsName](#s3logsname "logical name for this AWS S3 input")|Logical name for this AWS S3 input|General|
|[s3LogsEnabled](#s3logsenabled "sets whether this input is enabled")|Sets whether this input is enabled|General|
|[s3LogsPrintProgress](#s3logsprintprogress "sets whether this input prints throughput stats to the console")|Sets whether this input prints throughput stats to the console|General|
|[s3LogsAwsRegion](#s3logsawsregion "AWS region")|AWS region|Authentication|
|[s3LogsAwsAccessKeyID](#s3logsawsaccesskeyid "AWS authentication access key ID")|AWS authentication access key ID|Authentication|
|[s3LogsAwsSecretKey](#s3logsawssecretkey "AWS authentication secret key")|AWS authentication secret key|Authentication|
|[s3LogsBucket](#s3logsbucket "AWS S3 bucket name")|AWS S3 bucket name|Object|
|[s3LogsKey](#s3logskey "S3 object key to fetch")|S3 object key to fetch|Object|
|[s3LogsTotalBytesLimit](#s3logstotalbyteslimit "maximum total bytes to read from input before closing")|Maximum total bytes to read from input before closing|Backpressure|
|[s3LogsTotalEventsLimit](#s3logstotaleventslimit "maximum total events to read from input before closing")|Maximum total events to read from input before closing|Backpressure|
|[s3LogsTotalDuration](#s3logstotalduration "maximum duration to keep input open before closing")|Maximum duration to keep input open before closing|Backpressure|

### General

#### :material-menu-right-outline:**`s3LogsName`**

Logical name for this AWS S3 input.

|Type|Required|Category|
|---|---|---|
|String|✔|General|

Sets a logical name (e.g., 'myS3Input') for this input.
The [inputName](https://doc.log10x.com/api/js/#TenXBaseObject+inputName "Returns the context in which the current object, template or summary was created.") field
returns this value at run time to allow for identifying and operating on instances originating from this input.


#### :material-menu-right-outline:**`s3LogsEnabled`**

Sets whether this input is enabled.

|Type|Default|Category|
|---|---|---|
|Boolean|false|General|

Sets whether to open the input stream.
To enable this input only when an 's3LogsBucket' startup argument value is truthy, use:

```yaml
s3LogsEnabled: $=TenXEnv.get("s3LogsBucket")
```

To learn more see [TenXEnv.get](https://doc.log10x.com/api/js/#TenXEnv.get).


#### :material-menu-right-outline:**`s3LogsPrintProgress`**

Sets whether this input prints throughput stats to the console.

|Type|Default|Category|
|---|---|---|
|Boolean|false|General|

Sets whether this input prints throughput stats to the console
for testing an integration to a remote endpoint.


### Authentication

#### :material-menu-right-outline:**`s3LogsAwsRegion`**

AWS region.

|Type|Default|Category|
|---|---|---|
|String|""|Authentication|

Sets the AWS region (e.g., 'us-east-1') hosting
the target S3 bucket.

To learn more see [AWS Regions](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html){target="\_blank"}.


#### :material-menu-right-outline:**`s3LogsAwsAccessKeyID`**

AWS authentication access key ID.

|Type|Default|Category|
|---|---|---|
|String|""|Authentication|

Sets the AWS access key (e.g., 'AKIAIOSFODNN7EXAMPLE')
used as part of the request signing process.

**If not specified**, the system automatically falls back to the
[AWS default credential provider chain](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html){target="\_blank"},
which checks (in order):

1. Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)
2. Java system properties
3. Web identity token (for EKS)
4. Shared credentials file (`~/.aws/credentials`)
5. ECS container credentials
6. EC2 instance profile credentials

To learn more see [AWS access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html){target="\_blank"}.


#### :material-menu-right-outline:**`s3LogsAwsSecretKey`**

AWS authentication secret key.

|Type|Default|Category|
|---|---|---|
|String|""|Authentication|

Sets the AWS access secret key
(e.g. 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY') used as part of the request signing process.

**If not specified**, the system automatically falls back to the
[AWS default credential provider chain](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html){target="\_blank"}.
This allows using credentials from `~/.aws/credentials`, IAM roles, or environment variables
without explicit configuration.

To learn more see [AWS security credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html){target="\_blank"}.


### Object

#### :material-menu-right-outline:**`s3LogsBucket`**

AWS S3 bucket name.

|Type|Required|Category|
|---|---|---|
|String|✔|Object|

Sets the S3 bucket name (e.g., 'my-log-bucket') containing the object to read.

To learn more see [S3 Bucket Naming](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html){target="\_blank"}.


#### :material-menu-right-outline:**`s3LogsKey`**

S3 object key to fetch.

|Type|Required|Category|
|---|---|---|
|String|✔|Object|

sets the S3 object key (e.g., 'logs/2024/01/15/app.log') to fetch.

This input reads a single S3 object and transforms its line-delimited
content into TenXObjects for analysis.

For example:

```yaml
s3Logs:
  - name: MyLogs
    bucket: my-bucket
    key: logs/application.log
```


### Backpressure

#### :material-menu-right-outline:**`s3LogsTotalBytesLimit`**

Maximum total bytes to read from input before closing.

|Type|Default|Category|
|---|---|---|
|String|50000000|Backpressure|

sets the maximum number of bytes a target pipeline input will read into the pipeline.
This value limits the volume of events to read from the S3 object.

For example:

```yaml
s3LogsTotalBytesLimit: $=parseBytes("1GB")
```


#### :material-menu-right-outline:**`s3LogsTotalEventsLimit`**

Maximum total events to read from input before closing.

|Type|Default|Category|
|---|---|---|
|String|10000|Backpressure|

Sets the maximum number of events a target pipeline input will read into the pipeline.
This value limits the volume of events to read from the S3 object.


#### :material-menu-right-outline:**`s3LogsTotalDuration`**

Maximum duration to keep input open before closing.

|Type|Default|Category|
|---|---|---|
|String|parseDuration("5min")|Backpressure|

sets the maximum duration a target pipeline input will remain open.
When reached, the input will close and no more data will be read.

For example:

```yaml
s3LogsTotalDuration: $=parseDuration("10min")
```


<br/>:material-github: This module is defined in [s3Logs/module.yaml](https://github.com/log-10x/modules/tree/main/pipelines/run/modules/input/analyzer/s3Logs/module.yaml "s3Logs/module.yaml"){target="\_blank"}.

