View as Markdown
AWS icon

AWS ACTION

Redshift - Query Database

Run a SELECT query on a database. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's AWS account once, then configure and run Redshift - Query Database from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "aws-redshift-query-database",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    aws: { authProvisionId: "apn_xxxxxxx" },
    region: "AWS Region",
    workgroupName: "Workgroup Name",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Redshift - Query Database inputs
Property Type Description
region AWS Region string
The AWS region
Required Dynamic
workgroupName Workgroup Name string
The name of the serverless workgroup. Required if Cluster Identifier is not provided.
Required Dynamic
database Database Name string
The name of the database to connect to.
Required Dynamic
columns SELECT Columns Clause string[]
List of columns to retrieve.
Optional
from FROM Clause string
The FROM clause to select from. e.g. schema_name.table_name
Required
where WHERE Clause string
The WHERE clause to filter rows. e.g. id = :id. Use named parameters to avoid SQL injection.
Optional
orderBy Order By string
Column to order the results by (e.g., column_name ASC, column_name DESC).
Optional
limit Limit integer
Maximum number of rows to return.
Optional
sqlParameters Parameters For WHERE Clause object
An object with parameters to use in the WHERE clause. e.g. { "id": 1 }
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
aws-redshift-query-database
Version
0.0.4
App
AWS
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes