---
title: Kinesis
summary: Fastly will publish log messages to an Amazon Kinesis stream in the format specified in the Amazon Kinesis Data Streams logging object.
url: https://www.fastly.com/documentation/reference/api/logging/kinesis
---

Fastly will publish log messages to an Amazon Kinesis stream in the format specified in the Amazon Kinesis Data Streams logging object.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `access_key` | string | The access key associated with the target Amazon Kinesis stream. Not required if <code>iam_role</code> is specified. |
| `format` | string | A Fastly <a href="https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/">log format string</a>. |
| `iam_role` | string | The ARN for an IAM role granting Fastly access to the target Amazon Kinesis stream. Not required if <code>access_key</code> and <code>secret_key</code> are provided. |
| `name` | string | The name for the real-time logging configuration. |
| `placement` | string | Where in the generated VCL the logging call should be placed. If not set, endpoints with <code>format_version</code> of 2 are placed in <code>vcl_log</code> and those with <code>format_version</code> of 1 are placed in <code>vcl_deliver</code>. |
| `region` | string | A named set of <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints">AWS resources</a> that's in the same geographical area. |
| `secret_key` | string | The secret key associated with the target Amazon Kinesis stream. Not required if <code>iam_role</code> is specified. |
| `topic` | string | The Amazon Kinesis stream to send logs to. Required. |
| `format_version` | integer | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in <code>vcl_log</code> if <code>format_version</code> is set to <code>2</code> and in <code>vcl_deliver</code> if <code>format_version</code> is set to <code>1</code>. |
| `created_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `deleted_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `service_id` | string | Alphanumeric string identifying the service. (Read-only) |
| `updated_at` | string | Date and time in ISO 8601 format. (Read-only) |
| `version` | string | String identifying a service version. (Read-only) |

## API endpoints

### List Amazon Kinesis log endpoints

**GET** `/service/{service_id}/version/{version_id}/logging/kinesis`

List all of the Amazon Kinesis Data Streams logging objects for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Create  an Amazon Kinesis log endpoint

**POST** `/service/{service_id}/version/{version_id}/logging/kinesis`

Create an Amazon Kinesis Data Streams logging object for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Get an Amazon Kinesis log endpoint

**GET** `/service/{service_id}/version/{version_id}/logging/kinesis/{logging_kinesis_name}`

Get the details for an Amazon Kinesis Data Streams logging object for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `logging_kinesis_name` | string | path | Yes | The name for the real-time logging configuration. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Update the Amazon Kinesis log endpoint

**PUT** `/service/{service_id}/version/{version_id}/logging/kinesis/{logging_kinesis_name}`

Update an Amazon Kinesis Data Streams logging object for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `logging_kinesis_name` | string | path | Yes | The name for the real-time logging configuration. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

### Delete the Amazon Kinesis log endpoint

**DELETE** `/service/{service_id}/version/{version_id}/logging/kinesis/{logging_kinesis_name}`

Delete an Amazon Kinesis Data Streams logging object for a particular service and version.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `logging_kinesis_name` | string | path | Yes | The name for the real-time logging configuration. |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `version_id` | integer | path | Yes | Integer identifying a service version. |

