How to Enable Encryption in Redshift

Galaxy Glossary

How do I enable encryption in Amazon Redshift?

Enable encryption in Amazon Redshift to protect data at rest and enforce SSL in transit.

Sign up for the latest in SQL knowledge from the Galaxy Team!

Description

Why enable encryption in Redshift?

Encrypting the cluster protects sensitive customer, order, and payment data stored on disk and in automated snapshots. SSL ensures data in flight remains private.

Can I turn on encryption for an existing cluster?

No. You must create a new encrypted cluster or restore an encrypted snapshot. Plan migration time.

Which encryption options exist?

At-rest: AWS‐managed KMS key or customer KMS key (CMK).
In-transit: Force SSL by setting require_ssl parameter to true.

How do I create an encrypted cluster?

Use AWS CLI, SDK, or Console. Specify --encrypted true and an optional --kms-key-id. See syntax below.

How to migrate data to the new encrypted cluster?

Create a snapshot of the old cluster, restore it with encryption, or unload to S3 and reload with COPY.

How do I enforce SSL connections?

Modify the cluster parameter group: set require_ssl to true, then reboot.

What about data loaded from S3?

Use server-side encryption (SSE) on S3 objects and specify the aws_kms_key_id in the COPY command.

Best practices for encrypted Redshift

Rotate CMKs regularly, enforce SSL in connection strings, block unencrypted ports in security groups, and use IAM roles rather than access keys.

Example: load encrypted order data

The COPY example below shows loading encrypted order CSVs into the Orders table.

Why How to Enable Encryption in Redshift is important

How to Enable Encryption in Redshift Example Usage


-- Load encrypted product data into Products table
COPY Products(id, name, price, stock)
FROM 's3://ecom-data/products/'
CREDENTIALS 'aws_iam_role=arn:aws:iam::123456789012:role/RedshiftCopyRole'
CSV
ENCRYPTED
aws_kms_key_id 'arn:aws:kms:us-east-1:123456789012:key/b5f8e1d9-2af9-4a97-9a6c-3a8bbexample';

How to Enable Encryption in Redshift Syntax


AWS CLI – Create encrypted cluster:
aws redshift create-cluster \
  --cluster-identifier prod-ecom \
  --node-type ra3.xlplus \
  --number-of-nodes 2 \
  --master-username admin \
  --master-user-password "Str0ngP@ss" \
  --db-name ecommerce \
  --encrypted \
  --kms-key-id arn:aws:kms:us-east-1:123456789012:key/b5f8e1d9-2af9-4a97-9a6c-3a8bbexample 

SQL – enforce SSL (parameter group):
ALTER SYSTEM SET require_ssl = true;

COPY with encrypted S3 objects:
COPY Orders(id, customer_id, order_date, total_amount)
FROM 's3://ecom-data/orders/'
CREDENTIALS 'aws_iam_role=arn:aws:iam::123456789012:role/RedshiftCopyRole'
CSV
ENCRYPTED
aws_kms_key_id 'arn:aws:kms:us-east-1:123456789012:key/b5f8e1d9-2af9-4a97-9a6c-3a8bbexample';

Common Mistakes

Frequently Asked Questions (FAQs)

Does encryption impact query performance?

Minimal. Redshift uses hardware-accelerated AES, so most workloads see negligible impact.

Can I use my own KMS key?

Yes. Pass its ARN via --kms-key-id during cluster creation or snapshot restore.

Is column-level encryption supported?

No native feature exists. Use client-side encryption before loading or Amazon S3-side encryption on files.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie
BauHealth Logo
Truvideo Logo