> For the complete documentation index, see [llms.txt](https://upsolver.gitbook.io/content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upsolver.gitbook.io/content/how-to-guides-1/connectors/create-connections/amazon-kinesis.md).

# Amazon Kinesis

To read and work with your Amazon Kinesis data in Upsolver, you should first create a connection to your Kinesis stream that provides Upsolver with the necessary credentials to access your data. This guide shows you how.

## Create a Kinesis connection

#### Simple example

A Kinesis connection can be created as simply as follows:

```sql
CREATE KINESIS CONNECTION my_kinesis_connection
    REGION = 'us-east-1';
```

Note that the connection in this example is created based on the default credentials derived from Upsolver's integration with your AWS account.

#### Full example

The following example also creates a Kinesis connection but additionally configures credentials by providing a specific role as well as establishes the connection as read-only:

```sql
CREATE KINESIS CONNECTION my_kinesis_connection
    AWS_ROLE = 'arn:aws:iam::123456789012:role/upsolver-sqlake-role'
    REGION = 'us-east-1'
    READ_ONLY = true
    MAX_WRITERS = 22
    STREAM_DISPLAY_FILTERS = ('stream1', 'stream2')
    COMMENT = 'kinesis connection example';
```

To establish a connection with specific permissions, you can configure the `AWS_ROLE` and `EXTERNAL_ID` options like in the example above or you can configure the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` options to provide the credentials to read from your stream.

Additionally, all connections have read and write permissions by default but you can easily create a connection with only read access by setting `READ_ONLY` to `true`.

You can also limit the list of streams displayed within your catalog by providing the list of streams to display using `STREAM_DISPLAY_FILTER[S]`.

After you've created your connection, you are ready to move on to the next step of building your data pipeline: reading your data into Upsolver with an ingestion job.

## Alter a Kinesis connection

Some connection options are considered mutable, meaning that in some cases, you can run a SQL command to alter an existing Kinesis connection rather than create a new one.

For example, take the Kinesis connection we created previously based on default credentials:

```sql
CREATE KINESIS CONNECTION my_kinesis_connection
    REGION = 'us-east-1';
```

To change the connection's permissions and keep everything else the same without having to create an entirely new connection, you can run the following command:

```sql
ALTER KINESIS CONNECTION my_kinesis_connection
    SET AWS_ROLE = 'arn:aws:iam::123456789012:role/new-sqlake-role'; 
```

Note that some options such as `READ_ONLY` and `REGION` cannot be altered once the connection has been created.

## Drop a Kinesis connection

If you no longer need a connection, you can easily drop it with the following SQL command:

```sql
DROP CONNECTION my_kinesis_connection; 
```

However, note that if there are existing tables or jobs that are dependent upon the connection in question, the connection cannot be deleted.

***

{% hint style="success" %}
**Learn more**

For the full list of connection options with syntax and detailed descriptions, please see the SQL command reference for [Amazon Kinesis](/content/reference-1/sql-commands/connections/create-connection/amazon-s3.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://upsolver.gitbook.io/content/how-to-guides-1/connectors/create-connections/amazon-kinesis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
