> ## Documentation Index
> Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS S3 Sink

## Introduction

The S3 sink writes Run results to any S3-compatible storage as JSON files. This is useful for persisting results and accessing them later.

## Usage

S3 sinks can be used with either the [Run API](https://intunedhq.com/docs/client-apis/api-reference/projectsruns/run-api--start.md) or the [Job API](https://intunedhq.com/docs/client-apis/api-reference/projectsjobs/create-job.md).

When creating a Run or Job, specify the sink type as `s3` and provide the necessary S3 configuration such as `bucket`, `accessKeyId`, `secretAccessKey`, and `region`. You can also optionally provide a `prefix` to organize files within the bucket. See the Configuration section below for full details on available options.

## Configuration

### Properties

**type** `enum\<string\>` *required*

The type of sink.

Available options: `s3`

**bucket** `string` *required*

The name of the S3 bucket where Run results will be stored.

Example: `my-s3-bucket`

**accessKeyId** `string` *required*

The access key ID for the S3 bucket.

Example: `AKIAIOSFODNN7EXSSPLE`

**secretAccessKey** `string` *required*

The secret access key for the S3 bucket.

Example: `wJalrXUtnFFFI/K7MDENG/bsxRfiCYEXAMPLEKEY`

**region** `string` *required*

The region where the S3 bucket is located.

Example: `us-west-2`

**prefix** `string`

Optional prefix for the S3 objects. This can be used to organize objects within the bucket.

Example: `my-prefix/`

**skipOnFail** `boolean` (default: false)

If true, failed Runs will not be written to the bucket.

**apisToSend** `array\<string\>`

List of API names to include. If not provided, results from all APIs are written.

Example: `["api1", "api2"]`

**endpoint** `string`

Optional custom endpoint for the S3 bucket. This can be used for S3-compatible services.

Example: `https://s3.custom-endpoint.com`

**forcePathStyle** `boolean`

If true, the S3 client will use path-style URLs instead of virtual-hosted-style URLs. This is useful for S3-compatible services that require path-style access.

Example: `true`

### Example Configuration

```json theme={null}
{
  // other run/job configuration fields
  ....
  "sink": {
    "type": "s3",
    "bucketName": "my-bucket",
    "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
    "secretAccessKey": "wJalrXUtnFFFI/SSSSSSSbsxRfiCYEXAMPLEKEY",
    "region": "us-west-2",
    "prefix": "my-prefix/",
    "skipOnFail": false
  }
}
```

## File content

Each file is a `.json` file containing the API Run result along with additional metadata. See the [sink body page](https://intunedhq.com/docs/client-apis/api-reference/sinks/body.md) for more information on the payload structure.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.