---
title: "PUT /pipelines/{pipelineName}"
method: PUT
path: "/pipelines/{pipelineName}"
---

# PUT /pipelines/{pipelineName}

`PUT /pipelines/{pipelineName}`

Updates the settings of a pipeline. You must specify both a <code>channel</code> and a <code>datastore</code> activity and, optionally, as many as 23 additional activities in the <code>pipelineActivities</code> array.

## Path parameters

- `pipelineName` string, required

## Request body

- object
  - `pipelineActivities` PipelineActivity[], required — <p>A list of <code>PipelineActivity</code> objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.</p> <p>The list can be 2-25 <code>PipelineActivity</code> objects and must contain both a <code>channel</code> and a <code>datastore</code> activity. Each entry in the list must contain only one activity. For example:</p> <p> <code>pipelineActivities = [ { "channel": { ... } }, { "lambda": { ... } }, ... ]</code> </p>
    - `channel` object — Determines the source of the messages to be processed.
      - `name` string, required — The name of the channel activity.
      - `channelName` string, required — The name of the channel from which the messages are processed.
      - `next` string — The next activity in the pipeline.
    - `lambda` object — Runs a Lambda function to modify the message.
      - `name` string, required — The name of the lambda activity.
      - `lambdaName` string, required — The name of the Lambda function that is run on the message.
      - `batchSize` integer, required — <p>The number of messages passed to the Lambda function for processing.</p> <p>The Lambda function must be able to process all of these messages within five minutes, which is the maximum timeout duration for Lambda functions.</p>
      - `next` string — The next activity in the pipeline.
    - `datastore` object — Specifies where to store the processed message data.
      - `name` string, required — The name of the datastore activity.
      - `datastoreName` string, required — The name of the data store where processed messages are stored.
    - `addAttributes` object — Adds other attributes based on existing attributes in the message.
      - `name` string, required — The name of the addAttributes activity.
      - `attributes` object, required — <p>A list of 1-50 <code>AttributeNameMapping</code> objects that map an existing attribute to a new attribute.</p> <note> <p>The existing attributes remain in the message, so if you want to remove the originals, use <code>RemoveAttributeActivity</code>.</p> </note>
      - `next` string — The next activity in the pipeline.
    - `removeAttributes` object — Removes attributes from a message.
      - `name` string, required — The name of the <code>removeAttributes</code> activity.
      - `attributes` AttributeName[], required — A list of 1-50 attributes to remove from the message.
      - `next` string — The next activity in the pipeline.
    - `selectAttributes` object — Used to create a new message using only the specified attributes from the original message.
      - `name` string, required — The name of the <code>selectAttributes</code> activity.
      - `attributes` AttributeName[], required — A list of the attributes to select from the message.
      - `next` string — The next activity in the pipeline.
    - `filter` object — Filters a message based on its attributes.
      - `name` string, required — The name of the filter activity.
      - `filter` string, required — An expression that looks like a SQL WHERE clause that must return a Boolean value. Messages that satisfy the condition are passed to the next activity.
      - `next` string — The next activity in the pipeline.
    - `math` object — Computes an arithmetic expression using the message's attributes and adds it to the message.
      - `name` string, required — The name of the math activity.
      - `attribute` string, required — The name of the attribute that contains the result of the math operation.
      - `math` string, required — An expression that uses one or more existing attributes and must return an integer value.
      - `next` string — The next activity in the pipeline.
    - `deviceRegistryEnrich` object — Adds data from the IoT device registry to your message.
      - `name` string, required — The name of the <code>deviceRegistryEnrich</code> activity.
      - `attribute` string, required — The name of the attribute that is added to the message.
      - `thingName` string, required — The name of the IoT device whose registry information is added to the message.
      - `roleArn` string, required — The ARN of the role that allows access to the device's registry information.
      - `next` string — The next activity in the pipeline.
    - `deviceShadowEnrich` object — Adds information from the IoT Device Shadow service to a message.
      - `name` string, required — The name of the <code>deviceShadowEnrich</code> activity.
      - `attribute` string, required — The name of the attribute that is added to the message.
      - `thingName` string, required — The name of the IoT device whose shadow information is added to the message.
      - `roleArn` string, required — The ARN of the role that allows access to the device's shadow.
      - `next` string — The next activity in the pipeline.

## Response `200`

Success

## Other responses

- `480` — InvalidRequestException
- `481` — ResourceNotFoundException
- `482` — InternalFailureException
- `483` — ServiceUnavailableException
- `484` — ThrottlingException
- `485` — LimitExceededException

---

[API](https://skmtc.net/aws/apis/iotanalytics.md) · [All operations](https://skmtc.net/aws/apis/iotanalytics/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iotanalytics/versions/e78558b7408d/schema)
