Steps and SQL settings required to store Protected Health Information (PHI) securely in Amazon Redshift.
HIPAA eligibility requires encryption at rest and in transit, audit logging, least-privilege IAM, and execution within an AWS HIPAA Account with a signed BAA.
Enable AWS-managed KMS encryption when creating the cluster or run ALTER CLUSTER
to rotate keys. All tables and snapshots inherit encryption.
CREATE CLUSTER my_hipaa_cluster
KMS_KEY_ID 'arn:aws:kms:us-east-1:123:key/abcd'
ENCRYPTED;
Set the parameter group value require_ssl=true
.Client connections must include sslmode=require
.
Create views that exclude or hash PHI columns. Grant users access to the views, not the base tables.
CREATE VIEW v_customers_public AS
SELECT id,
sha256(email) AS email_hash,
created_at
FROM customers;
Turn on useractivitylog
and export to S3.Configure lifecycle rules to retain logs for six years.
ALTER SYSTEM SET enable_user_activity_logging = true;
Assign users to groups with only required permissions. Remove default CREATE
and ALTER
rights.
CREATE GROUP analysts;
REVOKE ALL ON SCHEMA public FROM GROUP analysts;
GRANT SELECT ON v_customers_public TO GROUP analysts;
Encrypt everywhere, log everything, restrict access, rotate keys, test disaster recovery, and document compliance controls.
.
No. You must also enable audit logging, restrict access, and operate under an AWS BAA.
Yes. Take an encrypted snapshot, restore it to a new HIPAA account with a signed BAA, and enable the required parameters.
Costs depend on S3 storage and CloudWatch ingestion. Compress logs and set lifecycle rules to control spend.