문제

I've looked all over the place, and can't find a good Amazon CloudFormation example of an Auto Scaling Group configured to add/remove capacity on a schedule.

Its certainly possible with the command line tools, but I can't find the corresponding CloudFormation language.

Anybody know how this is done?

도움이 되었습니까?

해결책

AWS CloudFormation sometimes doesn't cover all (new) API actions available within other AWS Products & Services, though they usually get introduced within a few month later on.

Unfortunately, despite Scale Based on a Schedule being introduced in December 2010 already, this feature is still not supported as of today, see Eric Hammond's recent Request: CloudFormation support for Auto Scaling schedules and suspend from January 2013 - the AWS team response is unusually sparse here (while never announcing dates, they often hint on priorities at least), thus it doesn't look promising exactly - accordingly you'll need to work around it for the time being.

Workaround

You might be able to integrate a custom workaround with CloudFormation still by means of the dedicated CustomResource type, which are special AWS CloudFormation resources that provide a way for a template developer to include resources in an AWS CloudFormation stack that are provided by a source other than Amazon Web Services. - the AWS CloudFormation Custom Resource Walkthrough provides a good overview of what this is all about, how it works and what's required to implement your own.

Your custom resource would need to implement the missing support for scheduled actions by explicitly calling the PutScheduledUpdateGroupAction API, you could then integrate this resource in your template to complement (or even replace) the as of yet insufficient official ScalingPolicy resource.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top