Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(autoscaling): StepScalingPolicy add evaluationPeriods parameter #13252

Closed
2 tasks
BDeus opened this issue Feb 24, 2021 · 2 comments
Closed
2 tasks

(autoscaling): StepScalingPolicy add evaluationPeriods parameter #13252

BDeus opened this issue Feb 24, 2021 · 2 comments
Assignees
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@BDeus
Copy link
Contributor

BDeus commented Feb 24, 2021

When creating a StepScalingPolicy for an ASG, we cannot configured the evaluationPeriods of the CloudwatchAlarm created in underlying.
The default value is enforced to 1

Proposed Solution

Add a property in BasicStepScalingPolicyProps:

/**
  * The number of the most recent periods, or data points, to evaluate when determining alarm state.
  * @default Default evaluation periods for cloudwatch alarms
  */
  readonly alarmEvaluationPeriods?: number;
}
...
this.upperAlarm = new cloudwatch.Alarm(this, 'UpperAlarm', {
    // Recommended by AutoScaling
    metric: props.metric,
    alarmDescription: 'Upper threshold scaling alarm',
    comparisonOperator: cloudwatch.ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,
    evaluationPeriods: props.alarmEvaluationPeriods,
    threshold,
});

Links

this.lowerAlarm = new cloudwatch.Alarm(this, 'LowerAlarm', {

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@BDeus BDeus added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 24, 2021
@github-actions github-actions bot added the @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling label Feb 24, 2021
@NetaNir NetaNir added p1 p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. p1 labels Feb 25, 2021
@rix0rrr
Copy link
Contributor

rix0rrr commented Mar 12, 2021

Closed by #13366

@rix0rrr rix0rrr closed this as completed Mar 12, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants