<a id="cc-amazon-cloudwatch-logs-source"></a>

# Amazon CloudWatch Logs Source Connector for Confluent Cloud

The fully managed Amazon CloudWatch Logs Source connector for Confluent Cloud imports
data from [Amazon CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html),
and then writes the data into an Apache Kafka® topic. The connector sources data from
a single log group and can write to one topic per log stream.

Confluent Cloud is available through [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-g5ujul6iovvcy?trk=14575e70-1766-4f20-8083-0c2757a1ec75&sc_channel=el)
or [directly from Confluent](https://www.confluent.io/get-started/).

The connector can start at one task to support all import data and can scale up
to one task per log stream. One task per log stream maximizes parallelism. Actual
throughput is bounded by AWS CloudWatch Logs API rate limits, which vary by
region. For current limits, see [CloudWatch Logs quotas](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html).

#### NOTE
* This Quick Start is for the fully managed Confluent Cloud connector. If you are
  installing the connector locally for Confluent Platform, see [Amazon CloudWatch Logs
  Source Connector for Confluent Platform](https://docs.confluent.io/kafka-connectors/aws-cloudwatch-logs/current/).
* If you require private networking for fully managed connectors, make sure to set up the proper
  networking beforehand. For more information, see [Manage Networking for Confluent Cloud Connectors](networking/internet-resource.md#clusters-connect-cloud).

## Features

The Amazon CloudWatch Logs Source connector provides the following features:

* **At least once delivery**: The connector guarantees that records are delivered at least once to the Kafka topic.
* **Supports multiple tasks**: The connector supports running one or more tasks. More tasks may improve performance. The connector can start at one task to support all import data and can scale up to one task per log stream. One task per log stream maximizes parallelism. Actual throughput is bounded by Amazon CloudWatch Logs API rate limits, which vary by region. For current limits, see [CloudWatch Logs quotas](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html).
* **Customize topic format**: The connector sources data from a single log group and can write to one topic per log stream. There is a Kafka topic format property (CLI property `kafka.topic.format`) you can use to customize the topic names for each log stream.
* **Supported data formats**: The connector supports Avro, String and JSON (schemaless) output formats. [Schema Registry](../get-started/schema-registry.md#cloud-sr-config) must be enabled to use a Schema Registry-based format (for example, Avro).
* **Provider integration support**: The connector supports IAM role-based authorization using the Confluent Provider Integration.
  For more information about provider integration setup, see the [IAM roles authentication](#cc-cloudwatch-source-setup-connection).
* **Enhanced log stream capacity**: The connector now supports more than 50 log streams, removing the previous limitation and allowing for greater scalability in log ingestion scenarios.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

## Limitations

Be sure to review the following information.

* For connector limitations, see [Amazon CloudWatch Logs Source Connector](limits.md#cc-amazon-cloudwatch-logs-source-limits) limitations.
* If you plan to use one or more Single Message Transformations (SMTs), see [SMT Limitations](single-message-transforms.md#cc-single-message-transforms-limitations).

## Quick Start

Use this quick start to get up and running with the Confluent Cloud Amazon CloudWatch
Logs Source connector. The quick start provides the basics of selecting the
connector and configuring it to stream events.

<a id="cc-amazon-cloudwatch-source-prereqs"></a>

Prerequisites
: - Authorized access to a [Confluent Cloud](https://www.confluent.io/confluent-cloud/) cluster on Amazon Web Services (AWS).
  - The Confluent CLI installed and configured for the cluster. See [Install the Confluent CLI](https://docs.confluent.io/confluent-cli/current/install.html).
  - For networking considerations, see [Networking and DNS](overview.md#connect-internet-access-resources). To use a set of public egress IP addresses, see [Public Egress IP Addresses for Confluent Cloud Connectors](static-egress-ip.md#cc-static-egress-ips).
  - An AWS account configured with [Access Keys](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys). You use these access keys when setting up the connector. Note the IAM identity must have the following minimum permissions (IAM policies):
    * `logs:GetLogEvents`
    * `logs:DescribeLogStreams`
    * `logs:FilterLogEvents`
    * `logs:DescribeLogGroups`
  <br/>
    For details, see [Using identity-based policies (IAM policies) for CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-identity-based-access-control-cwl.html).
  - Amazon CloudWatch connection details. For more information, see [log groups and log streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html).

### Using the Confluent Cloud Console

#### Step 1: Launch your Confluent Cloud cluster

To create and launch a Kafka cluster in Confluent Cloud, see [Create a kafka cluster in Confluent Cloud](../get-started/index.md#cloud-create-kafka-cluster).

#### Step 2: Add a connector

In the left navigation menu, click **Connectors**. If you already have connectors in your cluster, click **+ Add
connector**.

#### Step 3: Select your connector

Click the **Amazon CloudWatch Logs** connector card.

![Amazon CloudWatch Logs Source Connector Card](images/ccloud-amazon-cloudwatch-logs-source-icon.png)

<a id="cc-cloudwatch-source-setup-connection"></a>

#### Step 4: Enter the connector details

#### NOTE
* Make sure you have all your [prerequisites](#cc-amazon-cloudwatch-source-prereqs) completed.
* An asterisk ( \* ) designates a required entry.

At the **Add CloudWatch Logs Source Connector** screen, complete the following:

### Kafka access

1. Select the way you want to provide **Kafka Cluster credentials**. You can
   choose one of the following options:
   - **My account**: This setting allows your connector to globally access everything
     that you have access to. With a user account, the connector uses an API key and
     secret to access the Kafka cluster. This option is not recommended for production.
   - **Service account**: This setting limits the access for your connector by using a
     [service account](service-account.md#s3-cloud-service-account). This option is recommended for
     production.
   - **Use an existing API key**: This setting allows you to specify an API key and a
     secret pair. You can use an existing pair or create a new one. This method is not
     recommended for production environments.

   #### NOTE
   Freight clusters support only service accounts for Kafka authentication.
2. Click **Continue**.

### Authentication

1. Configure the authentication properties:

   **AWS credentials**
   - **Authentication method**: Select how you want to authenticate with AWS.
     * If you select **Access Keys**, enter your AWS credentials in the **Amazon Access Key ID** and **Amazon Secret Access Key fields**. For information about how to set these up, [Access Keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
     * If you select **IAM Roles**, choose an existing integration name under Provider integration name dropdown that has access to your resource. For more information, see [Manage Provider Integration for Fully Managed Connectors in Confluent Cloud](provider-integration.md#cloud-pi-quickstart).
   - **Provider Integration**: Select an existing integration that has access to your resource if you select **IAM Roles** as your authentication method.
   - **AWS Access Key ID**: The Amazon Access Key ID to connect to Amazon CloudWatch if you select **Access Keys** as your authentication method.
   - **AWS Secret Access Key**: The Amazon Secret Key to connect to Amazon CloudWatch if you select **Access Keys** as your authentication method.
2. Click **Continue**.

### Configuration

- **Kafka Topic Format**: Topic format to use for generating the names of the Apache Kafka® topics to publish data to. This format string can contain ${log-group} and ${log-stream} as a placeholder for the original log group and log stream names.
- **Output Kafka record value format**: Sets the output Kafka record value format (data going to the Kafka topic). Valid entries are AVRO, JSON, or JSON_SR (JSON Schema). [Schema Registry](../get-started/schema-registry.md#cloud-sr-config) must be enabled to use a Schema Registry-based format (for example, Avro, or JSON Schema).
- **Behavior on Errors**: Error handling behavior setting for the connector. Must be configured to one of the following: `IGNORE`, `FAIL`.
- **Amazon CloudWatch Logs Endpoint URL**: The URL to use as the
  endpoint for connecting to Amazon CloudWatch for Logs. For example,
  `https://logs.us-east-1.amazonaws.com`.
- **Amazon CloudWatch Logs Group Name**: The name of the log group on
  Amazon CloudWatch under which the desired log streams are contained.
- **Log message format**: Set the format of log messages ingested from CloudWatch Log Streams. Valid entries are `JSON` and `STRING`.

### **Show advanced configurations**

- **Schema context**: Select a schema context to use for this connector, if using
  a schema-based data format. This property defaults to the **Default** context,
  which configures the connector to use the default schema set up for Schema Registry in your
  Confluent Cloud environment. A schema context allows you to use separate schemas (like
  schema sub-registries) tied to topics in different Kafka clusters that share the
  same Schema Registry environment. For example, if you select a non-default context, a
  **Source** connector uses only that schema context to register a schema and a
  **Sink** connector uses only that schema context to read from. For more
  information about setting up a schema context, see [What are schema contexts and when should you use them?](../sr/faqs-cc.md#faq-schema-contexts).
- **Amazon CloudWatch Logs Stream Name(s)**: List of the log streams on
  Amazon CloudWatch where you want to track log records. If the
  field is left empty, all log streams under the log group are
  tracked.
- **AWS Poll Interval in Milliseconds**: Time in milliseconds (ms)
  the connector waits between polling the endpoint for updates. The
  default value is `1000` ms (1 second).

**Additional Configs**

- **Value Converter Decimal Format**: Specifies the `JSON` or `JSON_SR` serialization format for Connect `DECIMAL` logical type values with two allowed literals:
  `BASE64` to serialize `DECIMAL` logical types as base64 encoded binary data, and
  `NUMERIC` to serialize `DECIMAL` logical type values in `JSON` or `JSON_SR` as a number representing the decimal value.
- **Key Converter Schema ID Serializer**: The class name of the schema ID serializer for keys. This is used to serialize schema IDs in the message headers.
- **Value Converter Reference Subject Name Strategy**: Sets the subject reference name strategy for values. Valid entries are `DefaultReferenceSubjectNameStrategy` or `QualifiedReferenceSubjectNameStrategy`. You can use this strategy only with `PROTOBUF` format; the default strategy is `DefaultReferenceSubjectNameStrategy`.
- **errors.tolerance**: Use this property if you would like to configure the connector’s error handling behavior. WARNING: This property should be used with CAUTION for SOURCE CONNECTORS as it may lead to dataloss. If you set this property to ‘all’, the connector will not fail on errant records, but will instead log them (and send to DLQ for Sink Connectors) and continue processing. If you set this property to ‘none’, the connector task will fail on errant records.
- **Value Converter Connect Meta Data**: Enables the Connect converter to add its metadata to the output schema. Applies to Avro converters.
- **Value Converter Value Subject Name Strategy**: Determines how to construct the subject name under which the value schema is registered with Schema Registry.
- **Key Converter Key Subject Name Strategy**: Determines how to construct the subject name for key schema registration.
- **Value Converter Schema ID Serializer**: The class name of the schema ID serializer for values. This is used to serialize schema IDs in the message headers.

**Auto-restart policy**

- **Enable Connector Auto-restart**: Enables the auto-restart behavior of the connector and its
  task in the event of user-actionable errors. Defaults to `true`, enabling the connector to
  automatically restart in case of user-actionable errors. Set this property to `false` to
  disable auto-restart for failed connectors. If disabled, you must manually restart the connector.

**Transforms**

- **Single Message Transformations**: To add a new SMT, see [Add transforms](single-message-transforms.md#cc-single-message-transforms-ui).
  For more information about unsupported SMTs, see
  [Unsupported transformations](single-message-transforms.md#cc-single-message-transforms-unsupported-transforms).

**Processing position**

- **Set offsets**: Click **Set offsets** to define a specific offset for
  this connector to begin procession data from. For more information
  on managing offsets, see [Manage offsets](offsets.md#connect-custom-offsets).

For all property values and definitions, see [Configuration Properties](#cc-amazon-cloudwatch-logs-source-config-properties).

- Click **Continue**.

### Sizing

Based on the number of topic partitions you select, you will be provided
with a recommended number of tasks.

1. To change the number of tasks, use the Range Slider to select the
   desired number of tasks.
2. Click **Continue**.

### Review and Launch

1. Verify the connection details by previewing the running configuration.
   ![Launch the connector](images/ccloud-amazon-cloudwatch-logs-source-launch-connector.png)
2. After you’ve validated that the properties are configured to your
   satisfaction, click **Launch**.

   The status for the connector should go from **Provisioning** to
   **Running**.
   ![Connector status](images/ccloud-amazon-cloudwatch-source-status.png)

#### Step 5: Check for records

Verify that records are being produced at the Kafka topic.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

### Using the Confluent CLI

Complete the following steps to set up and run the connector using the Confluent CLI.

#### NOTE
Make sure you have all your [prerequisites](#cc-amazon-cloudwatch-source-prereqs) completed.

#### Step 1: List the available connectors

Enter the following command to list available connectors:

```none
confluent connect plugin list
```

#### Step 2: List the connector configuration properties

Enter the following command to show the connector configuration properties:

```none
confluent connect plugin describe <connector-plugin-name>
```

The command output shows the required and optional configuration properties.

#### Step 3: Create the connector configuration file

Create a JSON file that contains the connector configuration properties. The
following entry shows a typical connector configuration. When launched, the
connector consumes data from streams `stream-1` and `stream-2` of log group
`cloudwatch-group`. It produces the data to Kafka topic
`logs.cloudwatch-group.stream-1` and topic `logs.cloudwatch-group.stream-2`.

```json
{
  "name": "CloudWatchLogsSourceConnector_0",
  "config": {
    "connector.class": "CloudWatchLogsSource",
    "name": "CloudWatchLogsSourceConnector_0",
    "kafka.auth.mode": "KAFKA_API_KEY",
    "kafka.api.key": "<my-kafka-api-key>",
    "kafka.api.secret": "<my-kafka-api-secret>",
    "kafka.topic.format": "logs.${log-group}.${log-stream}",
    "output.data.format": "STRING",
    "aws.access.key.id": "<INSERT AWS API KEY>",
    "aws.secret.access.key": "<INSERT AWS API SECRET>",
    "aws.cloudwatch.logs.url": "https://logs.us-east-1.amazonaws.com",
    "aws.cloudwatch.log.group": "cloudwatch-group",
    "aws.cloudwatch.log.streams": "stream-1, stream-2",
    "aws.poll.interval.ms": "1500",
    "log.message.format": "STRING",
    "behavior.on.error": "FAIL",
    "tasks.max": "1"
  }
}
```

Note the following property definitions:

* `"connector.class"`: Identifies the connector plugin name.
* `"name"`: Sets a name for your new connector.

* `"kafka.auth.mode"`: Identifies the connector authentication mode you want to use. There are two options: `SERVICE_ACCOUNT` or `KAFKA_API_KEY` (the default). To use an API key and secret, specify the configuration properties `kafka.api.key` and `kafka.api.secret`, as shown in the example configuration (above).  To use a [service account](service-account.md#s3-cloud-service-account), specify the **Resource ID** in the property `kafka.service.account.id=<service-account-resource-ID>`. To list the available service account resource IDs, use the following command:
  ```bash
  confluent iam service-account list
  ```

  For example:
  ```bash
  confluent iam service-account list

     Id     | Resource ID |       Name        |    Description
  +---------+-------------+-------------------+-------------------
     123456 | sa-l1r23m   | sa-1              | Service account 1
     789101 | sa-l4d56p   | sa-2              | Service account 2
  ```

* `"kafka.topic.format"`: Topic format to use for generating the names of the Kafka topics. This format string can contain `${log-group}` and `${log-stream}` as a placeholder for the original log group and log stream names. For example, `confluent.${log-group}.${log-stream}` for the log group `log-group-1` and log stream `log-stream-1` maps to the topic name `confluent.log-group-1.log-stream-1`.
* `"output.data.format"`: Enter an output data format (data going to the Kafka topic): AVRO, STRING, or JSON (schemaless). [Schema Registry](../get-started/schema-registry.md#cloud-sr-config) must be enabled to use a Schema Registry-based format (for example, Avro).
* `"aws.access.key.id"` and `"aws.secret.access.key"`: Enter the AWS Access Key ID and Secret. For information about how to set these up, see [Access Keys](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys).
* `"aws.cloudwatch.logs.url"`: For example, `https://logs.us-east-1.amazonaws.com`. For additional information, see [Amazon CloudWatch Logs endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/cwl_region.html).
* `"aws.cloudwatch.log.group"`: Name of the log group on Amazon CloudWatch where the log streams are contained.
* `"aws.cloudwatch.log.streams"`: List of the log streams on Amazon CloudWatch where you want to track log records. If the property is not used, all log streams under the log group are tracked.
* `"aws.poll.interval.ms"`: Time in milliseconds (ms) the connector waits between polling the endpoint for updates. The default value is `1000` ms (1 second).
* `"log.message.format"`: Specifies the format for log messages received from CloudWatch Log Streams. Valid values for this configuration are `JSON` and `STRING`. The default value is `STRING`
* `"behavior.on.error"`: Determines how errors are managed by the connector. It must be set to one of the following: `IGNORE` or `FAIL`. When set to `FAIL`, the connector halts upon encountering an error while processing records. When set to `IGNORE`, the connector continues processing subsequent sets of records despite encountering errors. If a record is malformed, it is directed to the error topic associated with the connector. The default value is `FAIL`. Note: This configuration does not affect the connector’s behavior when log.message.format is set to `STRING`.
* `"tasks.max"`: Enter the number of [tasks](/platform/current/connect/concepts.html#tasks) to use with the connector. The connector supports running one or more tasks. The connector can start at one task to support all import data and can scale up to one task per log stream. One task per log stream maximizes parallelism. Actual throughput is bounded by AWS CloudWatch Logs API rate limits, which vary by region. For current limits, see [CloudWatch Logs quotas](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html).

**SMTs**: For details about adding SMTs using the Confluent CLI, see the [Single Message Transformations](single-message-transforms.md#cc-single-message-transforms) documentation.

See [Configuration Properties](#cc-amazon-cloudwatch-logs-source-config-properties) for all property
values and descriptions.

#### Step 4: Load the properties file and create the connector

Enter the following command to load the configuration and start the connector:

```none
confluent connect cluster create --config-file <file-name>.json
```

For example:

```none
confluent connect cluster create --config-file cloudwatch-logs-source-config.json
```

Example output:

```none
Created connector CloudWatchLogsSourceConnector_0 lcc-do6vzd
```

#### Step 5: Check the connector status

Enter the following command to check the connector status:

```none
confluent connect cluster list
```

Example output:

```none
ID           |             Name                 | Status  | Type  | Trace
+------------+-----------------------------   --+---------+--------+-------+
lcc-do6vzd   | CloudWatchLogsSourceConnector_0  | RUNNING | source |       |
```

#### Step 6: Check for records.

Verify that records are being produced at the Kafka topics `logs.cloudwatch-group.stream-1` and `logs.cloudwatch-group.stream-2`.

For more information and examples to use with the Confluent Cloud API for Connect,
see the [Confluent Cloud API for Connect Usage Examples](connect-api-section.md#ccloud-connect-api) section.

<a id="cc-amazon-cloudwatch-logs-source-config-properties"></a>

## Configuration Properties

Use the following configuration properties with the fully managed connector. For
self-managed connector property definitions and other details, see the connector
docs in [Self-managed connectors for Confluent Platform](/platform/current/connect/kafka_connectors.html).

### How should we connect to your data?

`name`
: Sets a name for your connector.
  <br/>
  * Type: string
  * Valid Values: A string at most 64 characters long
  * Importance: high

### Behavior On Errors

`behavior.on.error`
: Error handling behavior setting for the connector. Must be configured to one of the following: IGNORE, FAIL
  <br/>
  * Type: string
  * Default: FAIL
  * Valid Values: FAIL, IGNORE
  * Importance: medium

### Schema Config

`schema.context.name`
: Add a schema context name. A schema context represents an independent scope in Schema Registry. It is a separate sub-schema tied to topics in different Kafka clusters that share the same Schema Registry instance. If not used, the connector uses the default schema configured for Schema Registry in your Confluent Cloud environment.
  <br/>
  * Type: string
  * Default: default
  * Importance: medium

### Kafka Cluster credentials

`kafka.auth.mode`
: Kafka Authentication mode. It can be one of KAFKA_API_KEY or SERVICE_ACCOUNT. It defaults to KAFKA_API_KEY mode, whenever possible.
  <br/>
  * Type: string
  * Valid Values: SERVICE_ACCOUNT, KAFKA_API_KEY
  * Importance: high

`kafka.api.key`
: Kafka API Key. Required when kafka.auth.mode==KAFKA_API_KEY.
  <br/>
  * Type: password
  * Importance: high

`kafka.service.account.id`
: The Service Account that will be used to generate the API keys to communicate with Kafka Cluster.
  <br/>
  * Type: string
  * Importance: high

`kafka.api.secret`
: Secret associated with Kafka API key. Required when kafka.auth.mode==KAFKA_API_KEY.
  <br/>
  * Type: password
  * Importance: high

### How do you want to define topic names?

`kafka.topic.format`
: Topic format to use for generating the names of the Apache Kafka® topics to publish data to. This format string can contain ${log-group} and ${log-stream} as a placeholder for the original log group and log stream names.
  <br/>
  * Type: string
  * Default: ${log-group}.${log-stream}
  * Importance: high

### Output messages

`output.data.format`
: Sets the output Kafka record value format. Valid entries are AVRO, JSON or STRING. Note that you need to have Confluent Cloud Schema Registry configured if using a schema-based message format like AVRO.
  <br/>
  * Type: string
  * Importance: high

### AWS credentials

`authentication.method`
: Select how you want to authenticate with AWS.
  <br/>
  * Type: string
  * Default: Access Keys
  * Importance: high

`aws.access.key.id`
: The Amazon Access Key used to connect to Amazon CloudWatch.
  <br/>
  * Type: password
  * Importance: high

`provider.integration.id`
: Select an existing integration that has access to your resource. In case you need to integrate a new IAM role, use provider integration
  <br/>
  * Type: string
  * Importance: high

`aws.secret.access.key`
: The Amazon Secret Key used to connect to Amazon CloudWatch.
  <br/>
  * Type: password
  * Importance: high

### How should we connect to Amazon CloudWatch Logs?

`aws.cloudwatch.logs.url`
: The URL to use as the endpoint for connecting to Amazon CloudWatch for Logs. For example, https://logs.us-east-1.amazonaws.com.
  <br/>
  * Type: string
  * Importance: high

### CloudWatch Logs details

`aws.cloudwatch.log.group`
: Name of the log group on Amazon CloudWatch under which the desired log streams are contained.
  <br/>
  * Type: string
  * Importance: high

`log.message.format`
: Set the format of log messages ingested from CloudWatch Log Streams. Valid entries are JSON and STRING.
  <br/>
  * Type: string
  * Default: STRING
  * Valid Values: JSON, STRING
  * Importance: high

`aws.cloudwatch.log.streams`
: List of the log stream(s) on Amazon CloudWatch under which the desired log records are sent through. If the field is left empty, all log streams under the log group will be tracked.
  <br/>
  * Type: list
  * Importance: high

`aws.poll.interval.ms`
: Time in milliseconds to wait between two consecutive polls to the Amazon CloudWatch endpoint.
  <br/>
  * Type: int
  * Default: 1000 (1 second)
  * Valid Values: [0,…]
  * Importance: high

### Number of tasks for this connector

`tasks.max`
: Maximum number of tasks for the connector.
  <br/>
  * Type: int
  * Valid Values: [1,…]
  * Importance: high

### Additional Configs

`header.converter`
: The converter class for the headers. This is used to serialize and deserialize the headers of the messages.
  <br/>
  * Type: string
  * Importance: low

`producer.override.compression.type`
: The compression type for all data generated by the producer. Valid values are none, gzip, snappy, lz4, and zstd.
  <br/>
  * Type: string
  * Importance: low

`producer.override.linger.ms`
: The producer groups together any records that arrive in between request transmissions into a single batched request. More details can be found in the documentation: [https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#linger-ms](https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#linger-ms).
  <br/>
  * Type: long
  * Valid Values: [100,…,1000]
  * Importance: low

`value.converter.allow.optional.map.keys`
: Allow optional string map key when converting from Connect Schema to Avro Schema. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.auto.register.schemas`
: Specify if the Serializer should attempt to register the Schema.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.connect.meta.data`
: Allow the Connect converter to add its metadata to the output schema. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.enhanced.avro.schema.support`
: Enable enhanced schema support to preserve package information and Enums. Applicable for Avro Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.enhanced.protobuf.schema.support`
: Enable enhanced schema support to preserve package information. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.flatten.unions`
: Whether to flatten unions (oneofs). Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.generate.index.for.unions`
: Whether to generate an index suffix for unions. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.generate.struct.for.nulls`
: Whether to generate a struct variable for null values. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.int.for.enums`
: Whether to represent enums as integers. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.latest.compatibility.strict`
: Verify latest subject version is backward compatible when use.latest.version is true.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.object.additional.properties`
: Whether to allow additional properties for object schemas. Applicable for JSON_SR Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.optional.for.nullables`
: Whether nullable fields should be specified with an optional label. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.optional.for.proto2`
: Whether proto2 optionals are supported. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.use.latest.version`
: Use latest version of schema in subject for serialization when auto.register.schemas is false.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.use.optional.for.nonrequired`
: Whether to set non-required properties to be optional. Applicable for JSON_SR Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.wrapper.for.nullables`
: Whether nullable fields should use primitive wrapper messages. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`value.converter.wrapper.for.raw.primitives`
: Whether a wrapper message should be interpreted as a raw primitive at root level. Applicable for Protobuf Converters.
  <br/>
  * Type: boolean
  * Importance: low

`errors.tolerance`
: Use this property if you would like to configure the connector’s error handling behavior. WARNING: This property should be used with CAUTION for SOURCE CONNECTORS as it may lead to dataloss. If you set this property to ‘all’, the connector will not fail on errant records, but will instead log them (and send to DLQ for Sink Connectors) and continue processing. If you set this property to ‘none’, the connector task will fail on errant records.
  <br/>
  * Type: string
  * Default: none
  * Importance: low

`key.converter.key.schema.id.serializer`
: The class name of the schema ID serializer for keys. This is used to serialize schema IDs in the message headers.
  <br/>
  * Type: string
  * Default: io.confluent.kafka.serializers.schema.id.PrefixSchemaIdSerializer
  * Importance: low

`key.converter.key.subject.name.strategy`
: How to construct the subject name for key schema registration.
  <br/>
  * Type: string
  * Default: TopicNameStrategy
  * Importance: low

`value.converter.decimal.format`
: Specify the JSON/JSON_SR serialization format for Connect DECIMAL logical type values with two allowed literals:
  <br/>
  BASE64 to serialize DECIMAL logical types as base64 encoded binary data and
  <br/>
  NUMERIC to serialize Connect DECIMAL logical type values in JSON/JSON_SR as a number representing the decimal value.
  <br/>
  * Type: string
  * Default: BASE64
  * Importance: low

`value.converter.flatten.singleton.unions`
: Whether to flatten singleton unions. Applicable for Avro and JSON_SR Converters.
  <br/>
  * Type: boolean
  * Default: false
  * Importance: low

`value.converter.reference.subject.name.strategy`
: Set the subject reference name strategy for value. Valid entries are DefaultReferenceSubjectNameStrategy or QualifiedReferenceSubjectNameStrategy. Note that the subject reference name strategy can be selected only for PROTOBUF format with the default strategy being DefaultReferenceSubjectNameStrategy.
  <br/>
  * Type: string
  * Default: DefaultReferenceSubjectNameStrategy
  * Importance: low

`value.converter.value.schema.id.serializer`
: The class name of the schema ID serializer for values. This is used to serialize schema IDs in the message headers.
  <br/>
  * Type: string
  * Default: io.confluent.kafka.serializers.schema.id.PrefixSchemaIdSerializer
  * Importance: low

`value.converter.value.subject.name.strategy`
: Determines how to construct the subject name under which the value schema is registered with Schema Registry.
  <br/>
  * Type: string
  * Default: TopicNameStrategy
  * Importance: low

### Auto-restart policy

`auto.restart.on.user.error`
: Enable connector to automatically restart on user-actionable errors.
  <br/>
  * Type: boolean
  * Default: true
  * Importance: medium

<a id="cc-amazon-cloudwatch-logs-source-faq"></a>

## Frequently asked questions

Find answers to common questions about the Amazon CloudWatch Logs Source
connector for Confluent Cloud.

### What IAM permissions does the connector require?

The AWS IAM identity used by the connector must have the following minimum
permissions:

* `logs:GetLogEvents`
* `logs:DescribeLogStreams`
* `logs:FilterLogEvents`
* `logs:DescribeLogGroups`

For the full list of required permissions and an example IAM policy, see
[Using identity-based policies (IAM policies) for CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-identity-based-access-control-cwl.html).

### The connector is failing with “The provided credentials are invalid”. What should I check?

This error indicates that the AWS credentials provided to the connector
are not being accepted by Amazon CloudWatch Logs. Check the following:

* Verify that the AWS Access Key ID and Secret Access Key are correct
  and have not been rotated or revoked.
* Confirm that the IAM identity associated with the credentials has the
  minimum required permissions (`logs:GetLogEvents`,
  `logs:DescribeLogStreams`, `logs:FilterLogEvents`,
  `logs:DescribeLogGroups`) on the target log group.
* If you are using provider integration (IAM role-based authentication), verify that
  the role trust policy correctly allows the Confluent service principal to
  assume the role.
* Ensure the AWS region in `aws.cloudwatch.logs.url` matches the region
  where your log group resides.

### How do I scale the connector to handle more log streams?

The connector can scale up to one task per log stream. Increasing
`tasks.max` to match the number of log streams distributes the workload
across multiple tasks for better throughput. One task per log stream
maximizes parallelism. Actual throughput is bounded by AWS CloudWatch Logs
API rate limits, which vary by region. For current limits, see
[CloudWatch Logs quotas](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html).

Note that the connector starts with one task and can scale horizontally. For
best performance in high-volume scenarios, set `tasks.max` equal to the
number of log streams you are monitoring.

### How do I customize the Kafka topic names for each log stream?

Use the `kafka.topic.format` property to define a naming pattern for the
Kafka topics. The format string supports two placeholders:

* `${log-group}`: Replaced with the log group name.
* `${log-stream}`: Replaced with the log stream name.

For example, setting `kafka.topic.format` to
`logs.${log-group}.${log-stream}` for log group `my-app` and log stream
`prod-errors` results in the topic name `logs.my-app.prod-errors`.

### What happens when the connector encounters an error processing a record?

The connector’s behavior on errors is controlled by the `behavior.on.error`
property:

* `FAIL` (default): The connector halts when it encounters an error
  processing a record.
* `IGNORE`: The connector continues processing subsequent records despite
  errors. Malformed records are directed to the error topic associated with
  the connector.

#### NOTE
The `behavior.on.error` setting does not apply when
`log.message.format` is set to `STRING`.

### Can I monitor log streams from multiple log groups with one connector instance?

No. Each connector instance sources data from a single log group, specified
by the `aws.cloudwatch.log.group` property. To monitor log streams across
multiple log groups, create a separate connector instance for each log group.

Within a single log group, the connector can monitor all log streams or a
specific subset. To monitor specific streams, list them in the
`aws.cloudwatch.log.streams` property. If this property is not set, the
connector monitors all log streams in the log group.

## Next Steps

* For an example that shows fully managed Confluent Cloud connectors in action with
  Confluent Cloud for Apache Flink, see the [Cloud ETL Demo](/platform/current/tutorials/examples/cloud-etl/docs/index.html).
  This example also shows how to use Confluent CLI to manage your resources in
  Confluent Cloud.
  [![image](images/topology.png)](https://docs.confluent.io/platform/current/tutorials/examples/cloud-etl/docs/index.html)
* Try [Confluent Cloud on AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-g5ujul6iovvcy?trk=14575e70-1766-4f20-8083-0c2757a1ec75&sc_channel=el)
  with $1000 of free usage for 30 days, and pay as you go. No credit card is
  required.
