-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(aws-autoscaling): notificationTarget shouldn't be compulsory in LifecycleHook #14641
Copy link
Copy link
Closed
Closed
Copy link
Labels
@aws-cdk/aws-autoscalingRelated to Amazon EC2 Auto ScalingRelated to Amazon EC2 Auto ScalingbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp2
Description
The notificationTarget property can be unset and by default it will be able to use CWE to deliver Autoscaling Group notifications.
ASG API - https://docs.aws.amazon.com/cli/latest/reference/autoscaling/put-lifecycle-hook.html , keeps [--notification-target-arn <value>] as an optional param.
I was able to use L1 construct - CfnLifecycleHook as such without providing the notificationTarget
const lcHook = new autoscaling.CfnLifecycleHook(this, "LCHook", {
autoScalingGroupName: nodegroup.autoScalingGroupName,
lifecycleTransition: LifecycleTransition.INSTANCE_TERMINATING,
defaultResult: DefaultResult.CONTINUE,
lifecycleHookName: "TerminateLifecycleHook",
heartbeatTimeout: 300
})
Reproduction Steps
Documentation shows property is mandatory - https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-autoscaling.LifecycleHook.html
What did you expect to happen?
notificationTarget should be optional or should have a way to use the default CWE integration.
What actually happened?
Could not use CWE integration which is how aws-node-termination-handler needs to be configured
Environment
- CDK CLI Version : 1.97.0
- Framework Version:
- Node.js Version: v15.9.0
- OS : Mac
- Language (Version): TypeScript
Other
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-autoscalingRelated to Amazon EC2 Auto ScalingRelated to Amazon EC2 Auto ScalingbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp2