Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: Auto scaling groups with a load balancer should use health checks

This rule specifies that auto scaling groups with a load balancer should implement health checks for optimal performance.

RuleAuto Scaling groups with a load balancer should use health checks
FrameworkNIST 800-53 Revision 5
Severity
Critical

Rule Description

Auto Scaling groups with a load balancer should use health checks to ensure the instances within the group are functioning properly. This rule is based on the NIST 800-53 Revision 5 guidelines for ensuring the availability and reliability of cloud-based systems.

Troubleshooting Steps

If the Auto Scaling group with a load balancer is not using health checks, it may lead to instances being marked as healthy when they are not functioning properly. This can result in a degraded user experience or even service disruptions. To troubleshoot this issue, follow these steps:

  1. 1.

    Check Auto Scaling Group Configuration: Verify that the Auto Scaling group is configured to use a load balancer. Ensure that the load balancer settings are correctly defined in the group's configuration.

  2. 2.

    Review Health Check Configuration: Verify the health check settings for the load balancer associated with the Auto Scaling group. Confirm that the health check configuration is properly configured to determine if instances are healthy or not.

  3. 3.

    Examine Instance Health: Review the health status of individual instances within the Auto Scaling group. If any instances are reported as unhealthy, investigate the specific issues causing their health to degrade.

  4. 4.

    Analyze Load Balancer Logs: Check the load balancer logs to identify any errors, timeouts, or unhealthy responses from the instances. This can help pinpoint the source of the problem and guide subsequent troubleshooting steps.

Necessary Codes

If the Auto Scaling group is not configured to use health checks, you will need to modify the group's configuration. Use the following code snippets as a reference for the necessary changes:

  1. 1.
    Enable health checks for the Auto Scaling group:
aws autoscaling put-lifecycle-hook --lifecycle-hook-name <lifecycle-hook-name> --auto-scaling-group-name <auto-scaling-group-name> --heartbeat-timeout 120 --default-result CONTINUE
  1. 1.
    Configure health checks for the load balancer associated with the Auto Scaling group:
aws elbv2 configure-health-check --load-balancer-arn <load-balancer-arn> --health-check-protocol HTTP --health-check-port 80 --health-check-path /healthcheck --healthy-threshold-count 2 --unhealthy-threshold-count 2 --timeout-seconds 5 --interval-seconds 30

Note: Replace

<lifecycle-hook-name>
,
<auto-scaling-group-name>
,
<load-balancer-arn>
, and any other placeholder values with the actual names and ARNs specific to your environment.

Step-by-Step Guide for Remediation

To remediate the issue and ensure compliance with the NIST 800-53 Revision 5 guidelines, follow these step-by-step instructions:

  1. 1.

    Log in to the AWS Management Console or open the AWS CLI.

  2. 2.

    Identify the Auto Scaling group that needs health checks. Make a note of the Auto Scaling group name for reference.

  3. 3.

    Verify that the Auto Scaling group is associated with a load balancer. If not, you may need to associate a load balancer with the group.

  4. 4.

    Using the AWS CLI or AWS Management Console, configure health checks for the Auto Scaling group. Refer to the necessary codes section above for the code snippet to enable health checks.

  5. 5.

    Identify the load balancer associated with the Auto Scaling group. Make a note of the load balancer's ARN for reference.

  6. 6.

    Configure health checks for the load balancer. Use the provided code snippet as a reference and modify the values as per your environment's requirements.

  7. 7.

    Test the health checks by monitoring the instances within the Auto Scaling group. Ensure that instances marked as unhealthy trigger the appropriate actions, such as termination or replacement.

  8. 8.

    Monitor the logs of the load balancer for any errors or unhealthy responses. Take necessary actions to address any identified issues.

  9. 9.

    Regularly review the health check configurations, Auto Scaling group settings, and load balancer logs to ensure continued compliance with the NIST 800-53 Revision 5 guidelines.

By following these steps, you can successfully enable health checks for Auto Scaling groups with a load balancer and maintain compliance with the relevant security standards.

Is your System Free of Underlying Vulnerabilities?
Find Out Now