More Info:
Ensure that all Amazon Elastic MapReduce (EMR) clusters provisioned within your AWS account are using the latest generation of instances in order to get better performance at lower cost.Risk Level
MediumAddress
Cost Optimization, SecurityCompliance Standards
CBPRemediation
How to ensure EMR instance generation is latest.Using AWS Console
- Check the Amazon EMR documentation or release notes for the latest generation of instances available. The documentation will provide details about the latest instance types, specifications, and capabilities.
- Navigate to the Amazon EMR console.
- Select the EMR cluster for which you want to ensure the use of the latest instance generation. (In the Cloudanix Console, navigate to “Misconfig” page and look for Affected Assets for “EMR Instances Should Use Latest Generation” Policy.)
- Click on the “Hardware” tab or the “Edit” button to view and modify the instance settings.
- Review the current instance types configured for the cluster and compare them with the latest generation available. You can find the instance types under the “Instance Groups” section or the “Instances” tab.
- If the cluster is not using the latest generation instances, you can modify the instance groups or individual instance configurations to use the desired instance types.
- Select the latest generation instance types from the available options in the console. The latest generation instance types will typically have names that reflect the latest EC2 instance family.
- Save the changes and apply them to the cluster.
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
In AWS, the EMR control doesn’t map directly to Redshift, but the equivalent for Redshift is: “Redshift clusters should use current-generation node types (e.g., RA3 instead of DS2/DC1/DC2).”
Below are step‑by‑step console instructions to migrate a Redshift cluster to latest‑generation instances.
Below are step‑by‑step console instructions to migrate a Redshift cluster to latest‑generation instances.
1. Identify if your Redshift cluster is on an old generation
- Sign in to the AWS Management Console.
- Go to Amazon Redshift service.
- In the left pane, click Clusters.
- For each cluster:
- Click the cluster identifier to open its details.
- In the General information or Properties section, note the Node type (e.g.,
ds2.xlarge,dc1.large,dc2.large, etc.).
- If the node type is not RA3 (e.g.,
ra3.xlplus,ra3.4xlarge,ra3.16xlarge), it is not latest-generation.
2. Plan the migration (choose target RA3 node type)
- Estimate current cluster size and workload (concurrency, CPU, storage).
- From the Redshift pricing / documentation, decide an RA3 node type:
- Common options:
ra3.xlplus,ra3.4xlarge,ra3.16xlarge.
- Common options:
- Ensure your Region supports the RA3 node type you choose.
3. Create a snapshot (backup) of the existing cluster
- Still in the Clusters page, select your existing cluster.
- Click Actions → Take snapshot.
- Provide a Snapshot name.
- Click Create snapshot and wait until the status becomes Available.
4. Resize the existing cluster to a latest‑generation node type
You have two main console options: Elastic resize (faster, with some constraints) or Classic resize (slower, more flexible). The console will show what’s available.- In Clusters, select the cluster.
- Click Actions → Resize (or Modify depending on console version).
- In the resize wizard:
- Under Node type, choose the RA3 node type (e.g.,
ra3.xlplus). - Adjust Number of nodes if needed.
- Choose Elastic resize if it’s offered and supports your change; otherwise, use Classic resize.
- Under Node type, choose the RA3 node type (e.g.,
- Review the impact:
- Note possible performance impact or brief unavailability.
- Click Resize / Modify cluster to start the operation.
- Wait until the cluster status returns to Available and the new Node type shows the RA3 instance.
5. (Alternative) Create a new RA3 cluster and migrate
If you prefer not to resize in place:- From Snapshots, select the snapshot you created.
- Click Actions → Create cluster from snapshot.
- Set:
- A new Cluster identifier.
- Node type to an RA3 type.
- Adjust Number of nodes as needed.
- Complete the wizard to create the new cluster.
- Update:
- Any applications, BI tools, and connection strings to point to the new cluster endpoint.
- After verifying everything works, decommission the old cluster:
- In Clusters, select the old cluster → Actions → Delete.
- Optionally take a final snapshot before deletion.
6. Verify and document compliance
- In Clusters, confirm:
- Node type is RA3 for all production clusters.
- Optionally, tag the clusters (e.g.,
Key=Compliance, Value=LatestGeneration) for tracking. - Update your internal runbooks / standards to mandate RA3 for new Redshift clusters.
Using CLI
Using CLI
For Redshift, “latest generation” generally means RA3 node types (ra3.xlplus / ra3.4xlarge / ra3.16xlarge) instead of legacy dc2/ds2 nodes.
You can’t in‑place change the instance family; you must resize the cluster to a newer node type.Below are step‑by‑step AWS CLI steps.
Identify clusters using old node types (e.g.,
(You can confirm supported node types in docs or via console; CLI has no direct “list node types” API.)
Note:
For example, change toNotes:
Wait until status is
NodeType should now be one of the RA3 types.
Adjust node counts and types per your requirements.
You can’t in‑place change the instance family; you must resize the cluster to a newer node type.Below are step‑by‑step AWS CLI steps.
1. List your Redshift clusters and current node types
ds2.xlarge, ds2.8xlarge, dc2.large, dc2.8xlarge).2. Choose an appropriate latest‑gen node type
Common RA3 options:ra3.xlplus– smaller/cheaperra3.4xlarge– mid‑rangera3.16xlarge– largest
(You can confirm supported node types in docs or via console; CLI has no direct “list node types” API.)
3. Check cluster details before change
NumberOfNodesClusterType(e.g.,multi-nodeorsingle-node)- Any special settings you’ll need to preserve.
4. Resize the cluster to RA3 (classic resize)
Usemodify-cluster with --node-type.For example, change to
ra3.xlplus:--number-of-nodesis required when the node type changes on multi-node clusters.- Use
--cluster-type single-nodeif your cluster is single-node. - Remove
--no-skip-final-cluster-snapshotand instead add--skip-final-cluster-snapshotonly if you explicitly do NOT want a final snapshot.
5. Monitor resize progress
available.6. Verify the cluster is on latest‑gen nodes
7. (Optional) Automate remediation across all clusters
Example shell loop:Using Python
Using Python
For Redshift this translates to: “Redshift clusters should use latest‑generation node types (RA3 instead of older DS*/DC*).”
Below is how to identify non‑latest clusters and remediate them with Python (boto3).
This lets you confirm which clusters are using older generations (e.g.,
If you tell me your current node types and approximate cluster sizes, I can suggest more concrete RA3 mappings.
Below is how to identify non‑latest clusters and remediate them with Python (boto3).
1. Prerequisites
boto3installed:- AWS credentials configured (via
aws configure, env vars, or IAM role). - Decide your target node type, e.g.
ra3.4xlargeorra3.xlplus. - Understand Redshift resize is disruptive and can take time; plan for a maintenance window.
2. Identify Clusters Using Old Node Types
dc2.large, ds2.xlarge).3. Plan the Target Node Type and Size
You must choose:- A target RA3 node type, e.g.:
ra3.xlplusra3.4xlargera3.16xlarge
- The target number of nodes.
4. Perform a Classic Resize to RA3 With Python
Changing node type in Redshift is done viaresize_cluster. This is disruptive and can take a while.5. Integrate With a Compliance/Misconfiguration Check
To automatically remediate “EMR/Redshift nodes should use latest generation”:-
Periodically run a script or Lambda that:
- Lists clusters.
- Flags those where
NodeTypeis not RA3. - Either:
- Sends alerts, or
- Triggers the resize logic above (ideally gated by tags or an allow‑list).
-
Optionally, align this with AWS Config:
- Use a custom AWS Config rule (Lambda) that checks Redshift node types.
- If non‑RA3, mark non‑compliant and optionally trigger remediation via SSM or another Lambda using the same
resize_clusterlogic.
If you tell me your current node types and approximate cluster sizes, I can suggest more concrete RA3 mappings.
Using Terraform
Using Terraform
node_type forces replacement of the Redshift cluster, which is an outage-prone operation and will destroy/recreate the cluster and its data unless you design a migration strategy (snapshots, restore to new cluster, cutover, etc.).To verify, terraform plan should show an in-place ~ change to node_type accompanied by -/+ (destroy/create) for aws_redshift_cluster.this, indicating the cluster will be replaced with the new, latest-generation node type.
