Skip to content

AutoScaling: Support Custom Termination Policies (Lambda) #19750

@idwagner

Description

@idwagner

Describe the feature

AWS Autoscaling supports custom termination policies by passing a lambda function ARN as a policy, however CDK only supports standard policies by means of an enum.

Ref: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-termination-policies.html

Use Case

In order to implement this functionality currently, I need to use escape hatches to insert the desired state, which is undesirable and error prone.

Proposed Solution

It would be useful to be able to either pass a string value of the lambda arn (i.e. import value), or to pass a the reference of a lambda function in the same stack supporting its use of lambda versioning attributes.

Other Information

No response

Acknowledgements

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

CDK version used

CDK 2.10.0, Python aws-cdk==1.143.0

Environment details (OS name and version, etc.)

Debian Bullseye 11.1

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-autoscalingRelated to Amazon EC2 Auto Scalingeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdp1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions