# AWS S3

Sends message parts as objects to an Amazon S3 bucket. Each object is uploaded with the path specified with the `path` field.

## Configuration

| Name                      | Type                   | Optional | Secret | Description                                                                                                                   |
| ------------------------- | ---------------------- | -------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
| bucket                    | string                 | no       | no     | The bucket to upload messages to.                                                                                             |
| path                      | expression             | yes      | no     | The path of each message to upload. The value defaults to `${!counter()}-${!timestamp_unix_nano()}.txt`.                      |
| tags                      | map\[string]expression | yes      | no     | Key/value pairs to store with the object as tags. The value defaults to `map[]`.                                              |
| content_type              | string                 | yes      | no     | The content type to set for each object. The value defaults to `application/octet-stream`.                                    |
| content_encoding          | string                 | yes      | no     | An optional content encoding to set for each object.                                                                          |
| cache_control             | string                 | yes      | no     | The cache control to set for each object.                                                                                     |
| content_disposition       | string                 | yes      | no     | The content disposition to set for each object.                                                                               |
| content_language          | string                 | yes      | no     | The content language to set for each object.                                                                                  |
| content_md5               | string                 | yes      | no     | The content MD5 to set for each object.                                                                                       |
| website_redirect_location | string                 | yes      | no     | The website redirect location to set for each object.                                                                         |
| metadata                  | metadata               | yes      | no     | Specify criteria for which metadata values are attached to objects as headers.                                                |
| storage_class             | string                 | yes      | no     | The storage class to set for each object. The value defaults to `STANDARD`.                                                   |
| kms_key_id                | string                 | yes      | no     | An optional server side encryption key.                                                                                       |
| server_side_encryption    | string                 | yes      | no     | An optional server side encryption algorithm.                                                                                 |
| force_path_style_urls     | bool                   | yes      | no     | Forces the client API to use path style URLs, which helps when connecting to custom endpoints. The value defaults to `false`. |
| max_in_flight             | int                    | yes      | no     | The maximum number of parallel message batches to have in flight at any given time. The value defaults to `64`.               |
| timeout                   | string                 | yes      | no     | The maximum period to wait on an upload before abandoning it and reattempting. The value defaults to `5s`.                    |
| region                    | string                 | no       | no     | The AWS region to target.                                                                                                     |
| endpoint                  | string                 | yes      | no     | Allows you to specify a custom endpoint for the AWS API.                                                                      |
| credentials               | credentials            | no       | no     | Optional manual configuration of AWS credentials to use.                                                                      |

### Metadata

| Name             | Type   | Optional | Secret | Description                                                                                            |
| ---------------- | ------ | -------- | ------ | ------------------------------------------------------------------------------------------------------ |
| exclude_prefixes | string | yes      | no     | Provide a list of explicit metadata key prefixes to be excluded when adding metadata to sent messages. |

### Credentials

| Name   | Type   | Optional | Secret | Description                                                                           |
| ------ | ------ | -------- | ------ | ------------------------------------------------------------------------------------- |
| id     | string | yes      | no     | The ID of credentials to use.                                                         |
| secret | string | yes      | no     | The secret for the credentials being used.                                            |
| token  | string | yes      | no     | The token for the credentials being used, required when using short term credentials. |
