Install the AWS CLI, create a Redshift cluster, open network access, and connect with a PostgreSQL client from a Windows machine.
Install two tools: AWS CLI v2 for provisioning the cluster and psql (bundled with PostgreSQL) for SQL access. Use Chocolatey for one-line installs:choco install awscli
choco install postgresql
Open PowerShell and run the AWS CLI command in the us-east-1
region.Replace placeholders with your values.
aws redshift create-cluster \
--cluster-identifier ecommerce-dev \
--node-type ra3.xlplus \
--number-of-nodes 2 \
--master-username masteruser \
--master-user-password "Str0ngP@ss!" \
--db-name ecommerce \
--iam-roles arn:aws:iam::123456789012:role/RedshiftRole \
--region us-east-1
In the AWS console, edit the cluster’s VPC security group. Add an inbound rule for TCP 5439
from your office IP or VPN CIDR. Avoid 0.0.0.0/0 in production.
Copy the cluster endpoint (e.g., ecommerce-dev.abc123.us-east-1.redshift.amazonaws.com
).Then run:
psql "host=ecommerce-dev.abc123.us-east-1.redshift.amazonaws.com \
port=5439 dbname=ecommerce user=masteruser password=Str0ngP@ss!"
Run a quick query:
SELECT current_user, current_database(), version();
You should see your user, database, and the Redshift PostgreSQL version.
Yes. Use COPY
to pull CSV files from S3 into tables such as Customers
, Orders
, Products
, and OrderItems
.Example:
COPY Customers
FROM 's3://my-bucket/customers.csv'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftRole'
CSV;
%UserProfile%\.aws\credentials
and enable MFA.aws redshift modify-cluster
to apply automatic snapshots.enable_user_activity_logging
for auditing..
No. All commands run locally on your Windows laptop. The cluster itself runs in AWS.
Yes. Any PostgreSQL-compatible client works. Provide the endpoint, port 5439, and your credentials.
Run aws redshift modify-cluster --cluster-identifier ecommerce-dev --number-of-nodes 4
. Redshift will add nodes with minimal downtime.