Skip to content

EC2DeploymentOptions

Source code in docs_src/capo_codedeploy/types/ec2_deployment_options.py
class EC2DeploymentOptions(TypedDict, closed=True):
    auto_scaling_group_processes_to_suspend: NotRequired[
        "capo_codedeploy.types.auto_scaling_group_processes_to_suspend_list.AutoScalingGroupProcessesToSuspendList"
    ]
    """<p>The Amazon EC2 Auto Scaling processes to suspend during the deployment. CodeDeploy suspends these processes before it deploys to instances in an Auto Scaling group, and resumes them when the deployment succeeds, fails, or is stopped. Valid values are <code>Terminate</code>, <code>AZRebalance</code>, <code>InstanceRefresh</code>, and <code>ScheduledActions</code>.</p> <p>This parameter applies only to in-place deployments on the EC2/On-premises compute platform. If the list is empty, or if the deployment does not target instances in an Auto Scaling group, no processes are suspended.</p> <p>The service role for the deployment group must have permission to call <code>autoscaling:SuspendProcesses</code> and <code>autoscaling:ResumeProcesses</code> on the target Auto Scaling groups. If the processes cannot be suspended, the deployment fails before any instance is updated.</p> <p>If you suspend <code>ScheduledActions</code>, scheduled actions with a start time during the deployment are skipped and do not run after the process resumes.</p> <note> <p>If CodeDeploy cannot resume the processes, the deployment fails and the processes stay suspended until you resume them with the Auto Scaling <code>ResumeProcesses</code> action. While <code>Terminate</code> is suspended, Auto Scaling does not replace unhealthy instances. If you suspend <code>Terminate</code>, configure a trigger that notifies you when a deployment fails.</p> </note>"""

auto_scaling_group_processes_to_suspend instance-attribute

auto_scaling_group_processes_to_suspend: NotRequired[
    AutoScalingGroupProcessesToSuspendList
]

The Amazon EC2 Auto Scaling processes to suspend during the deployment. CodeDeploy suspends these processes before it deploys to instances in an Auto Scaling group, and resumes them when the deployment succeeds, fails, or is stopped. Valid values are Terminate, AZRebalance, InstanceRefresh, and ScheduledActions.

This parameter applies only to in-place deployments on the EC2/On-premises compute platform. If the list is empty, or if the deployment does not target instances in an Auto Scaling group, no processes are suspended.

The service role for the deployment group must have permission to call autoscaling:SuspendProcesses and autoscaling:ResumeProcesses on the target Auto Scaling groups. If the processes cannot be suspended, the deployment fails before any instance is updated.

If you suspend ScheduledActions, scheduled actions with a start time during the deployment are skipped and do not run after the process resumes.

If CodeDeploy cannot resume the processes, the deployment fails and the processes stay suspended until you resume them with the Auto Scaling ResumeProcesses action. While Terminate is suspended, Auto Scaling does not replace unhealthy instances. If you suspend Terminate, configure a trigger that notifies you when a deployment fails.