This rule ensures that SageMaker endpoint production variants have an initial instance count greater than 1 to promote high availability.
Rule | SageMaker endpoint production variants should have an initial instance count greater than 1 |
Framework | AWS Foundational Security Best Practices |
Severity | ✔ Medium |
Rule Description:
To adhere to AWS Foundational Security Best Practices, SageMaker endpoint production variants should have an initial instance count greater than 1. This ensures that the endpoint has high availability by distributing the workload across multiple instances, thereby minimizing the risk of downtime.
Troubleshooting Steps:
If the initial instance count is set to 1 for a SageMaker endpoint production variant, consider the following troubleshooting steps:
Remediation Steps:
Code Example:
import boto3 sagemaker = boto3.client('sagemaker') response = sagemaker.update_endpoint(EndpointName='your-endpoint-name', EndpointConfigName='your-endpoint-config', ProductionVariants=[ { 'InstanceType': 'ml.m4.xlarge', 'InitialInstanceCount': 2, 'ModelName': 'your-model-name', 'VariantName': 'AllTraffic' } ])
Following these remediation steps will ensure that the SageMaker endpoint production variant meets the AWS Foundational Security Best Practices by having an initial instance count greater than 1, thereby enhancing the endpoint's availability and reliability.