Introducing a new way to review your PRs.

Read the announcement

floci-io / floci

Light, fluffy, and always free - The AWS Local Emulator alternative

View on GitHub

38 documents · Updated Nov 23, 2026

docs / svc-redshift

Amazon Redshift analytics

Amazon Redshift provides an analytics control plane and a SQL data plane for provisioned clusters and serverless workgroups. Floci keeps AWS-shaped resource state, runs each active database on a local PostgreSQL engine, and exposes PostgreSQL wire access and the Redshift Data API. It also connects SQL to S3, supports Glue, Kinesis, and MSK Spectrum sources, supports external Lambda functions, applies resource policies, publishes resource events, and exposes Zero-ETL integration endpoints.

System boundary

Redshift has two related systems. The control plane manages resource identity, settings, credentials, policies, and lifecycle. The data plane runs SQL against a local database and returns a client-facing endpoint or an HTTP result.

This diagram shows how management requests, SQL clients, external data, and event consumers meet at the Redshift boundary.

flowchart LR
    A[AWS SDK or CLI] --> B[Redshift control plane]
    B --> C[Provisioned cluster]
    B --> D[Serverless namespace and workgroup]
    C --> E[PostgreSQL engine and auth proxy]
    D --> F[PostgreSQL engine and auth proxy]
    G[PostgreSQL client] --> E
    H[Redshift Data API] --> E
    H --> F
    E --> I[Spectrum and S3]
    F --> I
    B --> J[Events and SNS subscriptions]
    B --> K[Resource policies]
    L[DynamoDB or S3] --> M[Zero-ETL integration]
    M --> C
    M --> D

The endpoint in a describe response is the source of truth for wire clients. Resource metadata can remain after a runtime is lost, so a successful control-plane response does not always mean that SQL execution is ready. (src/…/RedshiftService.java• L382-443, src/…/RedshiftServerlessService.java• L161-219)

Resource control planes

Provisioned clusters

The provisioned control plane manages a Redshift cluster as an account- and Region-scoped resource. Its lifecycle includes endpoint discovery, snapshots, parameter and subnet metadata, tags, IAM role association, credentials, logging, schedules, integrations, events, table restore, and resource policies. (src/…/RedshiftService.java• L445-570, src/…/Cluster.java• L12-25)

Each active cluster has one PostgreSQL runtime and one Redshift authentication proxy. Requested Redshift settings remain resource data, while the local runtime supplies the SQL service. Managed master passwords also have a Secrets Manager record that follows password changes. (src/…/RedshiftService.java• L573-645, src/…/Cluster.java• L31-42)

Parameter groups provide engine settings that can affect SQL logging and other cluster behavior. Subnet groups preserve the VPC and subnet view used by the cluster, including the availability-zone mapping when it is known. (src/…/ClusterParameterGroup.java• L11-66, src/…/ClusterSubnetGroup.java• L11-40)

References: src/…/RedshiftService.java• L382-443 src/…/RedshiftService.java• L445-570 src/…/Cluster.java• L12-25

Serverless namespaces and workgroups

The serverless control plane separates a namespace from its workgroup. A namespace owns the database, administrator identity, IAM roles, log exports, and managed admin secret. A workgroup owns compute, network, endpoint, and performance settings and supplies the runtime for that namespace. (src/…/RedshiftServerlessService.java• L295-352, src/…/RedshiftServerlessService.java• L204-220)

Creating or recovering a workgroup starts a PostgreSQL runtime and an authentication proxy at its endpoint. Capacity and network fields shape the resource view but do not create a multi-node engine. Managed admin credentials stay synchronized between the namespace, its secret, the PostgreSQL role, and the proxy. (src/…/RedshiftServerlessService.java• L161-219, src/…/RedshiftServerlessService.java• L374-516)

Serverless snapshots preserve the workgroup database for restore. A snapshot can contain a database dump when a live runtime exists, or metadata only when no runtime is available. Snapshot copies keep source identity and Region state so a later sweep does not confuse a copy with a different snapshot of the same name. (src/…/RedshiftServerlessService.java• L577-642, src/…/RedshiftServerlessService.java• L799-887)

References: src/…/RedshiftServerlessService.java• L161-219 src/…/RedshiftServerlessService.java• L295-352 src/…/RedshiftServerlessService.java• L577-642

Endpoint access

Serverless endpoint access records a named managed VPC endpoint for a workgroup. It reports the workgroup's usable address and port because Floci does not create a separate VPC endpoint or listener. (src/…/RedshiftServerlessEndpointAccessService.java• L25-32, src/…/RedshiftServerlessEndpointAccessService.java• L51-87)

Endpoint records keep the workgroup identity that created them. Reads remove records whose workgroup was deleted or recreated, so a new workgroup with the same name does not inherit old endpoint access. (src/…/RedshiftServerlessEndpointAccessService.java• L139-178)

References: src/…/RedshiftServerlessEndpointAccessService.java• L25-32 src/…/RedshiftServerlessEndpointAccessService.java• L51-127 src/…/RedshiftServerlessEndpointAccessService.java• L139-178

Snapshots and schedules

Provisioned snapshots preserve a cluster database for restore. Snapshot records carry source identity, creation time, encryption key, tags, restore access, and copied-to-Region state. This identity prevents a replacement cluster or snapshot with the same name from reusing old dependent state. (src/…/Snapshot.java• L12-49, src/…/RedshiftService.java• L2232-2500)

Snapshot copy grants select the KMS key for cross-Region copies. Snapshot schedules define automated snapshot times and retention, while the cluster records which schedule it uses. This keeps deletion of a cluster from leaving a stale schedule association. (src/…/SnapshotCopyGrant.java• L8-26, src/…/SnapshotSchedule.java• L11-41)

Provisioned scheduled actions pause or resume a named cluster at a one-time or UTC cron time. A background sweep coalesces missed times to the latest due invocation and records the attempt, while the action's IAM role must trust the Redshift scheduler and allow the target operation. (src/…/RedshiftScheduledActionSchedule.java• L21-85, src/…/RedshiftScheduledActionService.java• L209-280, src/…/RedshiftScheduledActionAuthorizer.java• L17-55)

Serverless scheduled actions create snapshots for a namespace at a one-time or cron time. Background work uses checkpoints and pauses during reset. Expiration removes the snapshot data and its matching policy. (src/…/RedshiftServerlessScheduledActionService.java• L91-114, src/…/RedshiftServerlessSnapshotExpirationScheduler.java• L15-63)

References: src/…/Snapshot.java• L12-49 src/…/SnapshotCopyGrant.java• L8-26 src/…/SnapshotSchedule.java• L11-41 src/…/RedshiftService.java• L2232-2500

Events and notifications

Redshift records resource events for a limited history and can deliver matching events to standard SNS topics. Event subscriptions filter by source type, source identity, category, and severity. (src/…/RedshiftEventService.java• L44-64, src/…/RedshiftEventService.java• L259-315)

Event delivery is separate from the operation that raised the event. A missing topic or a topic policy that denies Redshift changes the subscription status and logs the delivery failure instead of changing the completed resource operation. Events older than 14 days are outside the describe window. (src/…/RedshiftEventService.java• L98-139, src/…/RedshiftEventService.java• L194-227)

References: src/…/RedshiftEventService.java• L44-64 src/…/RedshiftEventService.java• L98-139 src/…/RedshiftEventService.java• L331-401

Table restores

Table restore copies one table from a cluster or serverless snapshot into a live target under a new name. The accepted response reports PENDING, while the stored status records the request's completed SUCCEEDED or FAILED result. (src/…/RedshiftTableRestoreService.java• L22-29, src/…/RedshiftServerlessTableRestoreService.java• L22-29)

The shared restore path preserves the table definition and rows in one transaction. It checks source and target database names, supports case-sensitive names when requested, and rejects table forms that cannot be restored as one table. (src/…/RedshiftTableRestorer.java• L39-96, src/…/RedshiftTableRestorer.java• L121-173)

References: src/…/RedshiftTableRestoreService.java• L22-104 src/…/RedshiftServerlessTableRestoreService.java• L22-115 src/…/RedshiftTableRestorer.java• L121-217

Audit logging

Cluster audit logging publishes connection, user, and user-activity records to the configured CloudWatch Logs or S3 destination. User-activity records require both cluster logging and the activity-logging parameter, which connects parameter-group state to the audit stream. (src/…/RedshiftAuditLogPublisher.java• L39-48, src/…/RedshiftAuditLogPublisher.java• L287-306)

The audit target is independent of the resource model, so the same publisher can register a provisioned cluster or a live serverless workgroup. Provisioned S3 delivery checks the cluster identity and bucket policy, while serverless log exports use CloudWatch Logs. Delivery status is reported separately from the SQL result. (src/…/RedshiftAuditTarget.java• L7-26, src/…/RedshiftAuditLogPublisher.java• L325-397, src/…/RedshiftServerlessService.java• L244-275)

References: src/…/RedshiftAuditLogPublisher.java• L101-189 src/…/RedshiftAuditLogPublisher.java• L287-397 src/…/RedshiftServerlessService.java• L244-275

Resource policies

Redshift resource policies store an AWS policy document with a provisioned cluster or serverless namespace. The control plane validates the document, normalizes its returned form, and keeps the policy attached to the resource until it is replaced or deleted. (src/…/RedshiftResourcePolicies.java• L60-91, src/…/RedshiftResourcePolicies.java• L151-202, src/…/Cluster.java• L166-175)

These policies are separate from the password, temporary credential, and IAM role used for SQL access. Serverless snapshot sharing has its own policy and caller checks, so snapshot visibility and restore do not use the cluster or namespace policy record. (src/…/RedshiftServerlessResourcePolicyService.java• L46-117, src/…/RedshiftServerlessSharedSnapshots.java• L48-79)

References: src/…/RedshiftResourcePolicies.java• L27-91 src/…/RedshiftServerlessResourcePolicyService.java• L46-117 src/…/RedshiftServerlessSharedSnapshots.java• L48-79

Zero-ETL integrations

Zero-ETL integration connects a source to a Redshift target. The control plane accepts an S3 bucket for event-driven loading or a DynamoDB table or stream for backfill and change loading. The target can be a serverless namespace or a provisioned cluster, and endpoint resolution checks the exact source and target identity before the relationship is stored. (src/…/RedshiftService.java• L668-805)

An S3 event integration is active metadata for a bucket-to-target relationship. An S3 object update queues the bucket for a later sweep. The sweep runs matching automatic COPY JOB entries against each target database and retries when the target or job is not ready. Removing the integration disables automatic execution without deleting the job catalog. (src/…/RedshiftS3AutoCopyConsumer.java• L24-118, src/…/RedshiftCopyJobExecutor.java• L44-197)

A DynamoDB integration first backfills existing items, then reads new stream records and writes them to a Redshift landing table. It also maintains a current-state table shaped by the source key schema. Landing progress commits only after the matching write succeeds, while a projection failure can stall and later rebuild the current-state table without blocking the landing log. (src/…/RedshiftDynamoDbZeroEtlConsumer.java• L152-200, src/…/RedshiftDynamoDbZeroEtlConsumer.java• L266-413)

Integration state changes can produce ordered events on the default EventBridge bus. The integration record remains the control-plane source of truth for source, target, status, retry state, and endpoint identity. (src/…/RedshiftIntegrationEventPublisher.java• L96-139, src/…/RedshiftService.java• L766-804)

References: src/…/RedshiftService.java• L668-805 src/…/RedshiftS3AutoCopyConsumer.java• L24-118 src/…/RedshiftDynamoDbZeroEtlConsumer.java• L152-200 src/…/RedshiftIntegrationEventPublisher.java• L96-139

SQL access paths

PostgreSQL wire access

The wire path accepts a PostgreSQL client connection at the endpoint returned by the control plane. The proxy authenticates the login, relays ordinary PostgreSQL traffic, and inspects Redshift SQL forms that need compatibility handling. (src/…/RedshiftAuthProxy.java• L31-37, src/…/RedshiftAuthProxy.java• L278-344)

The proxy uses the cluster or workgroup password or a valid temporary Redshift credential. IAM authentication is not enabled on this socket path. Associated IAM roles are used later for S3 data movement and Spectrum reads, not for client login. (src/…/RedshiftAuthProxy.java• L297-307, src/…/RedshiftAuthProxy.java• L347-387)

The SQL boundary rewrites only supported Redshift table DDL forms, such as distribution, sort, encoding, and Redshift-only type clauses. It masks string and dollar-quoted literals and leaves unsupported or unsafe statements unchanged so PostgreSQL can reject them instead of receiving a silently altered query. (src/…/RedshiftSqlInterceptor.java• L10-41, src/…/RedshiftSqlInterceptor.java• L95-164)

Simple and Extended Query traffic share the SQL boundary. This preserves prepared statements, portals, transaction state, and response order while S3 and Spectrum operations take over only when the statement is understood. (src/…/RedshiftInterceptingBridge.java• L39-53, src/…/RedshiftInterceptingBridge.java• L280-354, src/…/ExtendedQuerySession.java• L12-43)

References: src/…/RedshiftAuthProxy.java• L31-37 src/…/RedshiftAuthProxy.java• L278-387 src/…/RedshiftSqlInterceptor.java• L10-41 src/…/RedshiftSqlInterceptor.java• L95-164

Redshift Data API

The Redshift Data API is the HTTP path for callers that do not open a PostgreSQL socket. It resolves a provisioned cluster or serverless workgroup, selects credentials from a secret, master user, or temporary IAM credential, and stores statement state so callers can inspect status and retrieve results later. (src/…/RedshiftDataResourceResolver.java• L81-132, src/…/RedshiftDataResourceResolver.java• L154-228)

Execution is asynchronous by default. A bounded worker admits statements, supports cancellation, and marks interrupted work as failed after reset. Retained sessions keep one caller's connection and transaction state. Client tokens make retries idempotent, while result APIs return status, metadata, and paged rows or formatted output. (src/…/RedshiftDataService.java• L165-208, src/…/RedshiftDataService.java• L266-375, src/…/RedshiftDataStatementStore.java• L30-83)

Data API execution shares the Spectrum preparation boundary with wire statements. It also applies transaction and auto-commit rules to DDL and COPY JOB catalog commands, supports batch execution, and can publish a terminal EventBridge event after storing the result. (src/…/RedshiftDataService.java• L534-590, src/…/RedshiftDataService.java• L916-1026)

References: src/…/RedshiftDataResourceResolver.java• L81-228 src/…/RedshiftDataService.java• L165-208 src/…/RedshiftDataStatementStore.java• L30-163

JDBC target resolution

JDBC consumers such as Firehose delivery and Glue crawlers use a logical Redshift JDBC URL to select a provisioned cluster or serverless workgroup. The URL parser uses the first host label as the resource name and uses the Redshift service label to distinguish serverless from provisioned access; the host suffix and URL port do not select the local backend. (src/…/RedshiftJdbcUrl.java• L6-29)

Target resolution maps the logical resource to its current local endpoint. A provisioned URL connects to the cluster's dev database, while a serverless URL must name the workgroup's only database. Secret-based JDBC callers must provide username and password fields in the selected Secrets Manager secret. (src/…/RedshiftJdbcTargets.java• L42-87)

This path is separate from the Data API resolver because the caller opens its own JDBC session. It still depends on the same control-plane identity and endpoint state, so deleted resources, stale ports, and invalid serverless database names fail before a SQL session is opened. (src/…/RedshiftJdbcTargets.java• L48-63)

References: src/…/RedshiftJdbcUrl.java• L6-29 src/…/RedshiftJdbcTargets.java• L42-87

Authentication paths

Provisioned and serverless credential APIs create short-lived access for the selected cluster or workgroup. IAM-derived credentials map the caller's IAM identity to a database user, while local fallback behavior gives unresolved callers a stable identity for emulator flows. (src/…/RedshiftIamDbUserResolver.java• L12-56, src/…/RedshiftServerlessJsonHandler.java• L218-230)

Data API requests can use a local Secrets Manager secret, a cluster database user, or a serverless workgroup identity. The resolver validates the target, secret Region, database, and credential source before opening a connection. Internal Data API connections use a short-lived single-use token to identify trusted proxy traffic. (src/…/RedshiftDataResourceResolver.java• L81-175, src/…/RedshiftDataConnectionFactory.java• L30-76)

These client login paths are separate from the IAM roles used for COPY, UNLOAD, and Spectrum. Role use checks the resource association, account, trust policy, identity policy, and S3 bucket policy before a short-lived role session can read or write objects. (src/…/RedshiftRoleAccess.java• L69-125, src/…/RedshiftRoleAccess.java• L225-306)

References: src/…/RedshiftIamDbUserResolver.java• L12-56 src/…/RedshiftDataResourceResolver.java• L81-228 src/…/RedshiftDataConnectionFactory.java• L30-76 src/…/RedshiftRoleAccess.java• L69-125

S3 data movement

Redshift SQL moves data between PostgreSQL tables and S3 through COPY and UNLOAD. The proxy parses supported forms, selects the named or default cluster IAM role or explicit credentials, checks access, and owns the S3 exchange while PostgreSQL remains the table engine. (src/…/RedshiftRoleAccess.java• L27-32, src/…/S3CopySimulator.java• L140-219)

COPY reads objects or manifests and streams their contents into a backend COPY FROM STDIN exchange. It supports common text, CSV, JSON Lines, compression, transforms, and bounded error handling. UNLOAD streams query output to delimited or Parquet objects and checks destination, overwrite, encryption, manifest, and role rules. (src/…/S3CopySimulator.java• L277-305, src/…/S3CopySimulator.java• L311-387)

Transfers use bounded memory and short-lived sessions. A file revision can be checked during automatic loading so an object that changes during a transfer fails rather than being recorded as the old input. Failures preserve the PostgreSQL response boundary, including transaction state. (src/…/S3CopySimulator.java• L84-95, src/…/S3CopySimulator.java• L490-519, src/…/S3CopySimulator.java• L664-718)

References: src/…/RedshiftRoleAccess.java• L27-32 src/…/RedshiftRoleAccess.java• L271-306 src/…/S3CopySimulator.java• L140-219 src/…/S3CopySimulator.java• L311-387

Spectrum external tables

External catalog and schema definition

Spectrum adds a catalog view over data that stays outside the local database. Redshift SQL can create external schemas over a Glue Data Catalog, Kinesis stream, or MSK cluster, then create and alter external tables where that source supports them. Glue-backed bindings retain the database and IAM role that define the schema's source. (src/…/ExternalStatementParser.java• L17-87, src/…/ExternalStatement.java• L8-49, src/…/ExternalSchemaBinding.java• L5-16, src/…/MskSchemaBinding.java• L6-25)

MSK schemas retain the cluster identity, authentication mode, and IAM role that Redshift uses to describe the source. Their stream topics are represented as a streaming source rather than as ordinary local tables. (src/…/MskSchemaBinding.java• L6-25, src/…/ExternalMetadataWriter.java• L83-99)

Redshift can also define scalar external functions backed by Lambda. The local database keeps a same-signature stub for SQL use, while the binding retains the Lambda target, IAM role, volatility, retry, and batch settings that belong to the external function. Function signatures include argument types, so overloads remain separate. (src/…/ExternalFunctionBinding.java• L7-50, src/…/ExternalFunctionRegistry.java• L13-30)

Glue table and partition metadata is projected into the local external catalog views. Kinesis schemas support streaming materialized views, and the same source model applies to MSK streaming schemas. A view stores one stream query and reads new records on explicit refresh, while the stream relation itself is not a normal user table. (src/…/ExternalMetadataWriter.java• L20-80, src/…/KinesisSchemaBinding.java• L5-20, src/…/KinesisStreamingViews.java• L27-34)

External-table DDL and query preparation share catalog locks. This prevents a query from loading metadata while a catalog change removes or replaces it. Unsupported external statements return a SQL feature error rather than becoming ordinary PostgreSQL tables. (src/…/SpectrumQueryPreparation.java• L151-229, src/…/SpectrumQueryPreparation.java• L289-345)

References: src/…/ExternalStatementParser.java• L17-87 src/…/ExternalMetadataWriter.java• L20-80 src/…/KinesisStreamingViews.java• L27-34 src/…/MskSchemaBinding.java• L6-25 src/…/ExternalFunctionBinding.java• L7-50 src/…/SpectrumQueryPreparation.java• L151-229

External query handling

When a query names a Glue-backed external relation, Spectrum resolves current metadata and loads the needed S3 rows into a connection-local PostgreSQL relation. PostgreSQL then performs the relational work such as joins, filters, grouping, ordering, limits, and parameter binding. (src/…/ExternalTableMaterializer.java• L211-338, src/…/ExternalTableMaterializer.java• L346-456)

Partitioned tables load only partitions that a supported predicate can select. Unknown predicates keep all possible partitions. Parse can prepare a parameterized query without values, and Bind loads the partitions selected by the bound values. Loads inside a transaction stay staged until commit and are discarded on rollback. (src/…/ExternalTableMaterializer.java• L346-456, src/…/RedshiftQueryPreparation.java• L96-116)

Kinesis and MSK stream data is handled through a streaming materialized view rather than a direct external-table scan. Creation checks the source and creates a local view over a staging relation. Refresh reads bounded batches from the source, runs the view query, and advances source progress only after the batch transaction commits. (src/…/KinesisStreamingViews.java• L135-209, src/…/MskSchemaBinding.java• L6-25)

Iceberg reads current metadata and manifest state on each query. Metadata, manifest, and data-file paths must be readable by the bound role before the scan. Simple Query, Extended Query, and Data API calls share this preparation boundary. (src/…/ExternalTableMaterializer.java• L569-755, src/…/RedshiftInterceptingBridge.java• L356-460, src/…/RedshiftDataService.java• L693-712)

This diagram shows how an external query becomes a local relational query and how a streaming refresh moves records through its staging relation.

sequenceDiagram
    participant C as SQL client or Data API
    participant P as Redshift query boundary
    participant G as Glue, Kinesis, or MSK
    participant A as IAM role checks
    participant S as S3 or stream records
    participant D as PostgreSQL runtime
    C->>P: External-table or streaming-view SQL
    P->>G: Resolve schema and current metadata
    P->>A: Check role and source access
    P->>S: List and read external objects or stream records
    S-->>P: Rows or records
    P->>D: Materialize relation or refresh view
    P->>D: Run prepared SQL
    D-->>C: Query result

References: src/…/ExternalTableMaterializer.java• L211-338 src/…/ExternalTableMaterializer.java• L346-456 src/…/KinesisStreamingViews.java• L157-225 src/…/ExternalTableMaterializer.java• L569-755

S3 and IAM boundary

Spectrum reads S3 through the local S3 service. An external-table role must be associated with the Redshift resource, trust Redshift, and pass identity and bucket-policy checks. Lake Formation checks can also protect Glue table reads when enforcement is enabled. Access is checked while the service lists and streams objects, so a query can fail after preparation starts. (src/…/RedshiftRoleAccess.java• L271-306, src/…/ExternalTableMaterializer.java• L250-337, src/…/ExternalTableMaterializer.java• L601-624)

Kinesis and MSK streaming views use the IAM role attached to the matching external schema. The role must allow Redshift to describe the source and read its records. The role used for Spectrum is not the client credential used to log in. (src/…/KinesisStreamingViews.java• L41-44, src/…/KinesisStreamingViews.java• L212-225, src/…/MskSchemaBinding.java• L10-24)

Iceberg adds a metadata boundary: its metadata, manifests, and data-file paths must stay within the allowed table location and remain readable by the role. (src/…/ExternalTableMaterializer.java• L569-755)

References: src/…/RedshiftRoleAccess.java• L69-125 src/…/RedshiftRoleAccess.java• L271-306 src/…/KinesisStreamingViews.java• L212-225 src/…/MskSchemaBinding.java• L10-24 src/…/ExternalTableMaterializer.java• L250-337 src/…/ExternalTableMaterializer.java• L569-755

Redshift uses durable AWS-shaped resources with transient database runtimes and connection boundaries. Shared identity behavior is in IAM and authentication, and account- and Region-scoped persistence is in Storage backend. External data access depends on the S3 service and Glue service boundaries. Database runtime relationships also connect to Databases and cache.

Specialized child pages for Redshift runtime and query-execution behavior can link from this overview when they are introduced.

Change checklist

When these files or sections are changed, remember to consider these:

  • If cluster or workgroup endpoint handling changes, keep persisted endpoint state, proxy binding, runtime recovery, JDBC target resolution, and Data API target resolution aligned.
  • If JDBC URL parsing changes, keep provisioned versus serverless detection, logical resource selection, ignored host and port fields, workgroup database validation, and secret credential parsing aligned.
  • If credentials change, keep wire login, JDBC and Data API resolution, IAM-derived database identity, secret Region checks, expiry, role cleanup, and internal proxy tokens aligned.
  • If snapshots change, keep source identity, creation time, KMS lookup, retention, copy tracking, restore access, table restore sources, and reset checkpoints aligned.
  • If event handling changes, keep event retention, filter matching, SNS topic checks, subscription status, and delivery failure isolation aligned.
  • If resource policies change, keep cluster and namespace storage separate from serverless snapshot policy evaluation and cross-account list filtering.
  • If zero-ETL changes, keep exact source and target ARN checks, bucket event queuing, target readiness, landing-table writes, current-state projection, retries, and integration events aligned.
  • If Data API execution changes, keep target resolution, admission, cancellation, sessions, transaction state, client-token idempotency, result retention, batch rules, and event delivery aligned.
  • If SQL compatibility changes, keep literal masking, the narrow DDL rewrite, and fail-open behavior aligned with Simple Query, Extended Query, JDBC, and Data API execution.
  • If S3 transfer or role checks change, keep role association, trust, identity policy, bucket policy, object revision checks, memory limits, and PostgreSQL response state aligned.
  • If Spectrum changes, keep Glue, Kinesis, and MSK bindings, external-function signatures, metadata locks, fresh metadata, conservative partition pruning, Bind-time parameters, transaction publication, streaming-view progress, source permissions, Lake Formation checks, and Iceberg path authorization aligned.

Important failure modes

TriggerConsequenceGuard
A resource is available but its runtime or proxy is not readyWire SQL, JDBC, Data API, or automatic COPY JOB execution failsTreat control-plane state and runtime readiness as separate states
A client assumes the standard Redshift portThe client cannot reach the proxyUse the current endpoint and port from the control-plane response or resolve the logical JDBC target
A JDBC URL has an unsupported host shape or service labelThe JDBC caller is rejected before target resolutionUse a Redshift or PostgreSQL URL with the cluster or workgroup label in the first host position
A serverless JDBC URL names a database other than the workgroup databaseThe JDBC session is refusedUse the database reported by the workgroup
A runtime is lost without a snapshotA replacement database has no prior dataUse snapshots when data must survive runtime loss
An endpoint record belongs to a deleted or recreated workgroupEndpoint access points to stale resource stateKeep the workgroup identity with the endpoint record and remove stale records
An event topic is missing or its policy denies RedshiftThe event is not delivered and the subscription records a failure statusValidate the topic and its SNS policy; do not make delivery part of the resource mutation
A serverless snapshot has no sharing policy or the policy denies the callerCross-account list, get, or restore cannot use the snapshotGrant the caller the required snapshot action in the snapshot resource policy
A scheduled action's role lacks scheduler trust or target permissionThe due pause or resume is recorded as a failure and does not change the clusterCheck both the role trust and the operation permission on the target cluster
A table restore names a missing, partitioned, or incompatible tableThe restore is rejected or ends in FAILED without a partial tableValidate snapshot table shape and run the restore in one transaction
An S3 object changes during a transferThe load fails instead of recording data from an unstable revisionKeep the expected object revision with the transfer
A COPY or UNLOAD role is not associated, trusted, or allowed by S3The SQL transfer fails with an access errorCheck the Redshift association, trust policy, identity policy, and bucket policy
A COPY record exceeds its transform or shared memory budgetThe load fails before unbounded memory useKeep record and shared transform limits bounded
A parser sees an unsupported or unsafe SQL clausePostgreSQL receives the original statement and rejects itKeep unsupported forms on the fail-open path
An external function lacks a valid volatility, Lambda target, or IAM roleFunction creation is rejected or the binding cannot represent the functionRequire the supported function contract and keep overload signatures distinct
An MSK external schema lacks authentication, cluster identity, or IAM role dataSchema creation is rejected and no source binding is availableSupply the required MSK schema options and keep source identity with the binding
A Spectrum role cannot read a table object, Iceberg file, or Kinesis or MSK sourceExternal query preparation or streaming refresh failsAlign role association, trust, identity policy, bucket policy, source permissions, Lake Formation grants, and path checks
A partition predicate cannot be proved safeMore partitions load than the query may needKeep unknown predicates as possible matches
A streaming view refresh is interrupted before its progress is savedThe last batch is read again on the next refreshSave progress only with the committed batch transaction
A streaming view uses multiple streams, a join, or an aggregateView creation is rejected because refresh batches cannot preserve the query's result semanticsKeep streaming views limited to one stream and row-preserving queries
An external load rolls backStaged rows or catalog state must not become visiblePublish materializer and schema-binding state only after the transaction commits
A snapshot, namespace, or workgroup is recreated under the same nameAn old policy, copy, action, or restore record can be applied to the new resourceMatch dependent state by creation time, resource generation, or resource identity

Key files

FileWhy to read it
src/…/RedshiftService.javaProvisioned cluster lifecycle, snapshots, integrations, runtime recovery, and resource state
src/…/RedshiftJdbcUrl.javaLogical JDBC URL parsing and provisioned versus serverless target selection
src/…/RedshiftJdbcTargets.javaJDBC endpoint and secret resolution for cluster and workgroup callers
src/…/RedshiftServerlessService.javaNamespace, workgroup, secret, runtime, snapshot, restore, endpoint, and serverless resource state
src/…/RedshiftEventService.javaEvent history, subscription filters, SNS delivery, and delivery failure state
src/…/RedshiftStoredResourceArns.javaKMS key and tag lookup for IAM decisions on named Redshift resources
src/…/RedshiftRoleAccess.javaRedshift role association, trust, temporary sessions, identity policy, and S3 authorization
src/…/RedshiftSqlInterceptor.javaNarrow Redshift table-DDL compatibility, literal masking, and fail-open behavior
src/…/S3CopySimulator.javaS3 transfer preparation, streaming, authorization, bounded memory, and response handling
src/…/RedshiftDataService.javaData API admission, sessions, transactions, execution, results, and events
src/…/RedshiftDataResourceResolver.javaCluster and workgroup target and credential selection for Data API calls
src/…/ExternalStatementParser.javaExternal schemas, tables, partitions, MSK schemas, functions, and streaming-view SQL recognition
src/…/ExternalFunctionBinding.javaDurable contract for external Lambda function identity and overload signatures
src/…/MskSchemaBinding.javaDurable identity and access settings for MSK external schemas
src/…/SpectrumQueryPreparation.javaExternal DDL, streaming-source handling, catalog binding, transaction publication, and query preparation
src/…/ExternalTableMaterializer.javaGlue metadata freshness, partition loads, S3 reads, transaction staging, and Iceberg checks
src/…/KinesisStreamingViews.javaStreaming-view creation, source refresh, authorization, staging, and progress checkpoints
src/…/KinesisViewBinding.javaPer-view stream query and per-shard refresh state
src/…/KinesisViewRegistry.javaDurable registry for Kinesis streaming views
src/…/ExternalMetadataWriter.javaGlue, Kinesis, and streaming-source metadata projection into Redshift external catalog views