AWS Security ChangesHomeSearch

AWS redshift documentation change

Service: redshift · 2026-04-10 · Documentation low

File: redshift/latest/mgmt/pass-sql-statements.md

Summary

Reorganized documentation sections for SQL execution methods, moving 'Run multiple SQL statements' before 'Run statements with parameters' and adding detailed examples for batch-execute-statement with shared parameters.

Security assessment

This change is purely a documentation reorganization and clarification of SQL execution methods. There is no mention of security vulnerabilities, patches, or security features. The changes focus on improving clarity and adding examples for batch SQL execution with parameter sharing.

Diff

diff --git a/redshift/latest/mgmt/pass-sql-statements.md b/redshift/latest/mgmt/pass-sql-statements.md
index 3a77338ba..e9fcda26d 100644
--- a//redshift/latest/mgmt/pass-sql-statements.md
+++ b//redshift/latest/mgmt/pass-sql-statements.md
@@ -5 +5 @@
-Run a SQL statementRun a SQL statement with parametersRun multiple SQL statements
+Run a SQL statementRun multiple SQL statementsRun statements with parameters
@@ -101 +101 @@ The following is an example of the response.
-## Run a SQL statement with parameters
+## Run multiple SQL statements
@@ -103 +103,26 @@ The following is an example of the response.
-To run a SQL statement, use the `aws redshift-data execute-statement` AWS CLI command.
+To run multiple SQL statements with one command, use the `aws redshift-data batch-execute-statement` AWS CLI command.
+
+The following AWS CLI command runs three SQL statements against a cluster and returns an identifier to fetch the results. This example uses the temporary credentials authentication method.
+    
+    
+    aws redshift-data batch-execute-statement 
+        --db-user myuser 
+        --cluster-identifier mycluster-test 
+        --database dev 
+        --sqls "set timezone to BST" "select * from mytable" "select * from another_table"
+    
+
+The following is an example of the response.
+    
+    
+    {
+        "ClusterIdentifier": "mycluster-test",
+        "CreatedAt": 1598306924.632,
+        "Database": "dev",
+        "DbUser": "myuser",
+        "Id": "d9b6c0c9-0747-4bf4-b142-e8883122f766"
+    }
+
+## Run statements with parameters
+
+You can use named parameters with both the `execute-statement` and `batch-execute-statement` operations. When using `batch-execute-statement`, parameters are shared across all SQL statements in the batch. Each SQL statement can reference a subset of the provided parameters, but every parameter must be used by at least one SQL statement.
@@ -328 +353 @@ Provides the following results:
-## Run multiple SQL statements
+The following AWS CLI command runs two SQL statements with shared named parameters against a cluster using `batch-execute-statement`. The SQL text has named parameters `id` and `name`. The first SQL statement uses the `id` parameter and the second uses the `name` parameter.
@@ -330 +354,0 @@ Provides the following results:
-To run multiple SQL statements with one command, use the `aws redshift-data batch-execute-statement` AWS CLI command.
@@ -332 +356,20 @@ To run multiple SQL statements with one command, use the `aws redshift-data batc
-The following AWS CLI command runs three SQL statements against a cluster and returns an identifier to fetch the results. This example uses the temporary credentials authentication method.
+    aws redshift-data batch-execute-statement 
+        --db-user myuser 
+        --cluster-identifier mycluster-test 
+        --database dev 
+        --sqls "SELECT * FROM mytable WHERE id = :id" "SELECT * FROM mytable WHERE name = :name" 
+        --parameters "[{\"name\": \"id\", \"value\": \"1\"},{\"name\": \"name\", \"value\": \"Alice\"}]"
+    
+
+The following is an example of the response.
+    
+    
+    {
+        "ClusterIdentifier": "mycluster-test",
+        "CreatedAt": 1598306924.632,
+        "Database": "dev",
+        "DbUser": "myuser",
+        "Id": "d9b6c0c9-0747-4bf4-b142-e8883122f766"
+    }
+
+The following AWS CLI command runs two SQL statements where the same parameter is used across both statements. The parameter named `id` is used in an INSERT statement and a SELECT statement.
@@ -339 +382,2 @@ The following AWS CLI command runs three SQL statements against a cluster and re
-        --sqls "set timezone to BST" "select * from mytable" "select * from another_table"
+        --sqls "INSERT INTO mytable VALUES(:id, :name, :address)" "SELECT * FROM mytable WHERE id = :id" 
+        --parameters "[{\"name\": \"id\", \"value\": \"1\"},{\"name\": \"name\", \"value\": \"Alice\"},{\"name\": \"address\", \"value\": \"Seattle\"}]"