aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

aws-applicationautoscaling, aws-autoscaling: Scheduled actions missing support to specify timezone property

Open ShadowDog007 opened this issue 4 years ago • 9 comments

Describe the feature

Scheduled actions for both applicationautoscaling ScalableTarget and autoscaling support specifying the timezone property.

This should be exposed from CDK apis.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-timezone

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-timezone

Use Case

Supporting scaling actions which adjust for daylight savings

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

CDK version used

2.47.0

Environment details (OS name and version, etc.)

n/a

ShadowDog007 avatar Oct 25 '22 23:10 ShadowDog007

Yes, we should be able to support this. Thanks for the request.

@bora-7 do you want to work on this?

peterwoodworth avatar Nov 03 '22 21:11 peterwoodworth

Yes, I will work on this.

bora-7 avatar Nov 04 '22 01:11 bora-7

@bora-7 just FYI #17330 added timeszone to aws-autoscaling but it's still missing from aws-applicationautoscaling

ShadowDog007 avatar Nov 13 '22 07:11 ShadowDog007

A pity. This is now one year old, and CDK still does not support timezones in aws-applicationautoscaling.

sothawo avatar Oct 27 '23 13:10 sothawo

It looks like @bora-7 had a crack at this but it was never meged

neilferreira avatar Dec 04 '23 06:12 neilferreira

nevermind - this was actioend in 2.97.1 with the new Schedule class! https://github.com/aws/aws-cdk/releases/tag/v2.97.1

This can be closed.

neilferreira avatar Dec 04 '23 06:12 neilferreira

I am using aws-cdk 2.115.0. I am creating an ECS service

            const scaledTask = loadBalancedFargateService.service.autoScaleTaskCount({
                maxCapacity: props.ecsService.maxScaledContainerCount,
                minCapacity: props.ecsService.desiredContainerCount,
            })

loadBalancedFargateService.service is a FargateService; and then when trying to set a schedule

            scaledTask.scaleOnSchedule("sched1", {
                startTime: someTime,
                endTime: someTime,
                // no timezone here
            })

there still is no possibility to set the timezone

sothawo avatar Jan 11 '24 07:01 sothawo

This was brought in version 2.97.1 but then it was taken out. Now I'm stuck at 2.97 and unable to move forward without the timezone capability for my fargate ecs tasks.

saudansari avatar Jan 27 '24 08:01 saudansari

⚠️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.

github-actions[bot] avatar Feb 15 '24 18:02 github-actions[bot]