Skip to main content

More Info:

Your AWS Elasticsearch Service (ES) clusters should be using dedicated master nodes to improve their environmental stability by offloading all the management tasks from the cluster data nodes.

Risk Level

Low

Address

Reliability, Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • Cloudanix Best Practice
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

Sure, here are the step-by-step instructions on how to remediate the Elasticsearch cluster misconfiguration in AWS:
  1. Log in to your AWS Management Console.
  2. Go to the Elasticsearch service dashboard.
  3. Select the Elasticsearch cluster that needs remediation.
  4. Click on the “Modify” button.
  5. Scroll down to the “Dedicated master nodes” section.
  6. Enable the “Dedicated master nodes” option.
  7. Select the instance type for the dedicated master nodes.
  8. Choose the number of dedicated master nodes you want to have.
  9. Click on the “Review and Submit” button.
  10. Review the changes you made and click on the “Submit” button to apply the changes.
Once you have completed these steps, your Elasticsearch cluster will have dedicated master nodes enabled, which will help to improve the cluster’s stability and reliability.

To remediate the Elasticsearch cluster misconfiguration in AWS using AWS CLI, follow these steps:
  1. Open the AWS CLI on your local computer or EC2 instance.
  2. Get the Elasticsearch domain name using the following command:
  1. Get the Elasticsearch cluster configuration using the following command:
  1. Check if the Dedicated Master is enabled or not. If it is not enabled, you will see “false” in the output of the above command.
  2. To enable the Dedicated Master, use the following command:
  1. Wait for a few minutes for the changes to take effect.
  2. Verify the configuration by running the same command as step 3.
  3. Check if the Dedicated Master is enabled or not. If it is enabled, you will see “true” in the output of the above command.
By following these steps, you can remediate the Elasticsearch cluster misconfiguration of not having Dedicated Master enabled in AWS using AWS CLI.
To remediate the Elasticsearch cluster misconfiguration for AWS using Python, follow these steps:
  1. Install the AWS SDK for Python (Boto3) using the following command:
  1. Create an AWS Elastic Cloud Compute (EC2) instance and install Elasticsearch on it. You can use the following code to create an EC2 instance:
  1. Install the Elasticsearch Python client using the following command:
  1. Use the Elasticsearch Python client to enable dedicated master nodes for the Elasticsearch cluster. You can use the following code:
  1. Verify that dedicated master nodes have been enabled by checking the Elasticsearch cluster settings using the following code:
  1. Delete the EC2 instance that you created in step 2 using the following code:
By following these steps, you can remediate the Elasticsearch cluster misconfiguration for AWS using Python.
Enabling dedicated master nodes in cluster_config updates the existing domain in place (no forced replacement), but it will trigger a configuration change that can take significant time and incur additional cost for the new master instances.After editing, terraform plan should show an in-place update on aws_elasticsearch_domain.this with dedicated_master_enabled changing from false to true, dedicated_master_type set to MASTER_INSTANCE_TYPE, and dedicated_master_count set to 3.

Additional Reading: