aws / aws/aws-cdk

aws_applicationautoscaling: Throw error when autoscaling policy breaches service limits during deployment

Open
#29,082 2 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-applicationautoscaling @aws-cdk/aws-iam effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

I'd like to see an error when an AWS account tries to deploy an autoscaling policy that violates service limits. For example, if I try to create an autoscaling policy with a max instance count of 40 when the service limit is 20, that should throw an error.

As a short term stop-gap, perhaps when code fails to autoscale a sagemaker endpoint to X number of instances because the account-level service limit is Y number of instances and X is > Y, then the endpoint should scale to Y instances at least.

### Use Case

The AWS account had a service limit of 20 instances but the sagemaker endpoint tried to scale to 40 instances and I got this error:

“Failed to set desired instance count to 40. Reason: The account-level service limit 'ml.p3.2xlarge for endpoint usage' is 20 Instances, with current utilization of 6 Instances and a request delta of 34 Instances”.

This could have been prevented by an error saying that I cannot create an autsocaling policy that breaches service limits.

The impact of this issue could be mitigated if the endpoint at least scaled up to 20 instances. Instead, the endpoint stayed at 6 and kept trying to scale to 40.

### Proposed Solution

_No response_

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.87

### Environment details (OS name and version, etc.)

Amazon Linux 2 x86_64

Contributor guide

Open the contributing guide

Research direction

Start at the aws_applicationautoscaling module and trace how autoscaling policies are deployed and how SageMaker scaling failures are surfaced. Confirm whether the intended behavior is deployment-time validation, scaling to the service limit, or both; done should include a defined response for policies exceeding the account limit and coverage for the reported 40-versus-20 scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.