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
CDK version used
CDK 2.10.0, Python aws-cdk==1.143.0
Environment details (OS name and version, etc.)
Debian Bullseye 11.1
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
CDK version used
CDK 2.10.0, Python aws-cdk==1.143.0
Environment details (OS name and version, etc.)
Debian Bullseye 11.1