More Info:
Ensure that your AWS Elastic MapReduce (EMR) clusters are encrypted in order to meet security and compliance requirements. Data encryption helps prevent unauthorized users from reading sensitive data available on your EMR clusters and their associated data storage systems. This includes data saved to persistent media, known as data at-rest, and data that can be intercepted as it travels through the network, known as data in-transit.Risk Level
HighAddress
Security, Cost OptimizationCompliance Standards
HIPAA,GDPR,NIST,AWSWAFRemediation
How to enable in transit and at rest encryption for EMR.Using AWS Console
- Log in to the AWS Management Console using your AWS account credentials.
- Navigate to the Amazon EMR service by selecting “EMR” from the services menu. (In the Cloudanix Console, navigate to “Misconfig” page and look for Affected Assets for “EMR In-Transit and At-Rest Encryption” Policy.)
- Click on the “Create cluster” button to create a new EMR cluster or select an existing cluster to modify its settings.
- In the “Create Cluster” or “Cluster List” page, scroll down to the “Security and Encryption” section.
- Under the “Encryption” tab, you will find options for both in-transit and at-rest encryption.
- To enable in-transit encryption, select the “Enable” checkbox next to “Encryption in transit”.
- Choose the desired encryption option for in-transit encryption. You can select “SSL” for encryption using SSL/TLS or “Custom” to provide your own custom encryption settings.
- To enable at-rest encryption, select the “Enable” checkbox next to “Encryption at rest”.
- Choose the desired encryption option for at-rest encryption. You can select “Default AWS Key Management Service (KMS) key” or “Custom AWS KMS key” for encryption using AWS KMS. If you choose the “Custom AWS KMS key” option, provide the ARN (Amazon Resource Name) of the KMS key you want to use.
- Review the other configuration settings for your EMR cluster, such as instance types, storage, and software configuration.
- Click on the “Create cluster” or “Modify cluster” button to start the cluster creation or modification process.
- AWS will provision the EMR cluster with the specified encryption settings, enabling both in-transit and at-rest encryption.
Additional Reading
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Below are step‑by‑step console instructions to enable at‑rest and in‑transit encryption for Amazon Redshift.
1. At‑Rest Encryption (Redshift)
A. Check whether your existing cluster is encrypted
- Sign in to the AWS Management Console.
- Go to Amazon Redshift console.
- In the left pane, choose Clusters.
- Click your cluster identifier.
- On the Configuration tab, look for:
- Encryption: Enabled / Disabled
- KMS key: Which KMS key is used, if enabled.
Note: Redshift cluster encryption cannot be turned on or off for an existing cluster. You must create a new encrypted cluster and move data.
B. Create or choose a KMS Customer Managed Key (optional but recommended)
If you don’t want to use the default AWS managed key:- Open the AWS KMS console.
- Select Customer managed keys → Create key.
- Choose Symmetric → Next.
- Give it an alias (e.g.,
alias/redshift-encryption-key). - Configure key administrators and key usage permissions (grant Redshift account roles or IAM roles that will manage the cluster).
- Finish key creation.
C. Create a new encrypted Redshift cluster
- In the Redshift console, go to Clusters → Create cluster.
- Under Cluster configuration, set:
- Cluster identifier, Node type, number of nodes as needed.
- Under Database configurations, set admin username/password.
- Under Security and encryption (or similar section):
- Turn Encryption: On.
- KMS key: Select either:
- Default AWS Key for Redshift, or
- The customer managed key you created (e.g.,
alias/redshift-encryption-key).
- Configure networking/security groups as needed.
- Choose Create cluster.
D. Move data from unencrypted to encrypted cluster
-
Option 1 – Snapshot and restore (if original is encrypted with a different key or you’re cloning an already‑encrypted one):
- For an unencrypted cluster you can’t create an encrypted snapshot directly; instead:
- Create a new encrypted cluster (done above),
- Use UNLOAD / COPY commands to migrate data.
- For an unencrypted cluster you can’t create an encrypted snapshot directly; instead:
-
Option 2 – UNLOAD / COPY:
- From the source (unencrypted) cluster:
- Use
UNLOADto export data to S3 (optionally encrypt S3 objects with SSE‑S3 or SSE‑KMS).
- Use
- From the target (encrypted) cluster:
- Use
COPYto load data from S3 into the new cluster.
- Use
- From the source (unencrypted) cluster:
- After validation, point applications to the new encrypted cluster and decommission the old one.
2. In‑Transit Encryption (SSL/TLS) for Redshift
Redshift supports SSL/TLS for connections. You must:- Ensure the cluster has SSL enabled (it is by default),
- Optionally enforce SSL in a parameter group,
- Update clients to use SSL.
A. Verify or configure SSL requirement via parameter group
- Go to the Redshift console → Parameter groups.
- Find the parameter group associated with your cluster:
- In Clusters → select cluster → Properties → note the Parameter group.
- If using the default parameter group:
- You cannot modify it. Create a new parameter group:
- Parameter groups → Create parameter group.
- Choose:
- Parameter group family matching your engine version.
- Group name and Description.
- Click Create.
- You cannot modify it. Create a new parameter group:
- Select your (new) parameter group → Edit parameters.
- Find parameter:
require_ssl.- Set Value to
true.
- Set Value to
- Save changes.
B. Attach the parameter group to the cluster
- In the Redshift console, go to Clusters.
- Select your cluster → Actions → Modify cluster.
- Under Database configurations (or Cluster properties):
- Set Parameter group to the new parameter group where
require_ssl = true.
- Set Parameter group to the new parameter group where
- Save/Apply changes and reboot the cluster if prompted:
- Cluster → Actions → Reboot (if not done automatically).
C. Ensure clients connect using SSL
For each application / client:- Get cluster endpoint:
- Redshift console → Clusters → select cluster → General information → Endpoint.
- Use SSL-enabled connection strings.
-
psql:
-
JDBC URL:
-
ODBC:
- In DSN configuration, enable SSL or Require SSL.
- If you need certificate validation, download Redshift’s public certificate from AWS docs and configure client trust stores accordingly (optional but recommended).
3. Validate the Remediation
- At rest:
- Redshift console → Clusters → select cluster → Configuration:
- Confirm Encryption: Enabled and correct KMS key.
- Redshift console → Clusters → select cluster → Configuration:
- In transit:
- Confirm applications can only connect when SSL is enabled.
- Try a test connection without SSL and verify it fails.
Using CLI
Using CLI
For Amazon Redshift, “in‑transit” = SSL, and “at‑rest” = KMS encryption on the cluster.
At‑rest encryption cannot be turned on for an existing unencrypted cluster; you must migrate to a new encrypted cluster.Below are step‑by‑step AWS CLI instructions.
Output will include You can then use
Wait until the snapshot is
You can also specify node type, security groups, etc., if you want to override snapshot defaults (optional):Wait until the new cluster is
(Or omit
(Use
2.2. Set
You can verify:
You must reboot for static parameters to take effect:
Should return Make sure
At‑rest encryption cannot be turned on for an existing unencrypted cluster; you must migrate to a new encrypted cluster.Below are step‑by‑step AWS CLI instructions.
1. At‑Rest Encryption (Redshift)
1.1. Create (or identify) a KMS key
"KeyId": "arn:aws:kms:region:account-id:key/xxxxxxxx" – save this ARN.Optionally add an alias:alias/redshift-kms instead of the full ARN.1.2. Snapshot your existing unencrypted cluster
Replacemy-redshift-cluster and my-redshift-snapshot:available:1.3. Restore a new encrypted cluster from the snapshot
available:1.4. Cut over and clean up
- Update applications to point to the new cluster’s endpoint (from
describe-clusters). - When fully migrated, delete the old unencrypted cluster:
--skip-final-cluster-snapshot and specify --final-cluster-snapshot-identifier if you want a final backup.)2. In‑Transit Encryption (SSL) for Redshift
To enforce SSL, configure a parameter group and apply it to the cluster.2.1. Create a parameter group (if you don’t already have a custom one)
redshift-1.0 or the family appropriate to your engine version.)2.2. Set require_ssl to true
2.3. Attach the parameter group to your (encrypted) cluster
2.4. Ensure clients actually use SSL
Redshift will now require SSL, but your clients must be configured correctly:- JDBC:
ssl=trueorsslmode=requirein the connection string. - ODBC: enable SSL / require SSL in DSN settings.
- psql:
sslmode=require(orverify-ca/verify-fullwith appropriate CA).
3. Quick Verification
At‑rest encryption:true and the KMS key.In‑transit (SSL) enforcement:my-redshift-ssl-pg is attached and ParameterApplyStatus is in-sync. Then test connections; non‑SSL connections should fail.If you share your current cluster identifier and whether it’s already encrypted, I can tailor exact CLI commands for your environment.Using Python
Using Python
For Amazon Redshift, “in-transit” = SSL/TLS for client connections; “at-rest” = KMS-encrypted data on disk (cluster + snapshots).
Below is how to remediate both using Python (boto3).
Replace placeholders like
Now your data at rest (cluster & snapshots) is encrypted.
To ensure cross-region snapshot copy is encrypted:
A. Create / update a parameter group with
Then reboot (or wait for Redshift to apply & manually reboot):
Make sure your Python clients use SSL, for example with
Below is how to remediate both using Python (boto3).
Prereqs
<CLUSTER_IDENTIFIER>, <KMS_KEY_ARN> as needed.1. At-Rest Encryption
A. New cluster (easiest)
You cannot enable encryption on an existing unencrypted cluster; you must create a new encrypted one and migrate.- Create an encrypted snapshot of the old cluster (unencrypted snapshot → restore as encrypted).
- Wait for snapshot to be available (poll or use waiter):
- Restore snapshot to a new encrypted cluster:
- Wait for new cluster to be available:
- Update clients / apps / connection strings to point to the new cluster’s endpoint, test, then delete the old cluster:
B. Ensuring snapshots are encrypted
For an already encrypted cluster, snapshots are encrypted automatically with the same KMS key.To ensure cross-region snapshot copy is encrypted:
2. In-Transit Encryption (SSL/TLS)
You enable and enforce SSL via a parameter group (require_ssl).A. Create / update a parameter group with require_ssl=1
- Create a new parameter group (if you don’t want to modify an existing one):
- Set
require_ssl = true(1):
require_ssl is a static parameter → cluster must be rebooted after the parameter group is associated.
B. Attach the parameter group to your cluster
3. Enforce SSL From Clients
Afterrequire_ssl is on, non-SSL connections will fail.Make sure your Python clients use SSL, for example with
psycopg2:Summary
- At rest (Redshift):
- Existing unencrypted: snapshot → restore encrypted cluster (with
Encrypted=True,KmsKeyId=...) → switch traffic → delete old cluster. - New clusters: always create with
Encrypted=True.
- Existing unencrypted: snapshot → restore encrypted cluster (with
- In transit:
- Create/modify parameter group: set
require_ssl=true. - Attach parameter group, reboot cluster.
- Ensure all clients connect with
sslmode=require(or stronger).
- Create/modify parameter group: set
Using Terraform
Using Terraform
terraform plan should show encrypted = true, the desired kms_key_id on aws_redshift_cluster.this, and parameter.require_ssl changing/created as value = "true" on aws_redshift_parameter_group.ssl_enforced, with a note that the cluster will be replaced if it was previously unencrypted.
