Difference between revisions of "AWS EC2 Instance lifecycle"
Jump to navigation
Jump to search
(13 intermediate revisions by 4 users not shown) | |||
Line 2: | Line 2: | ||
− | * <code>pending</code> | + | * <code>[[pending]]</code> |
− | * <code>running</code> | + | * <code>[[running]]</code> |
− | * <code>stopping</code> | + | * <code>[[stopping]]</code> |
− | * <code>stopped</code> | + | * <code>[[stopped]]</code> |
− | * <code>shutting-down</code> | + | * <code>[[shutting-down]]</code> |
− | * <code>terminated</code> | + | * <code>[[terminated]]</code> |
+ | == Terminated == | ||
+ | In AWS, when an instance is terminated, it is no longer running and cannot be restarted. The amount of time that a terminated instance remains visible in the [[AWS Management Console]] depends on the retention period set for the [[Auto Scaling group]] or the [[EC2 instance]]. The default [[retention period]] is one hour, but it can be configured to be up to seven days. Once the retention period has expired, the terminated instance is permanently deleted and is no longer visible in the AWS Management Console. Ref: [[ChatGPT]] | ||
+ | Two days, according to [[ChatGPT]] | ||
+ | * <code>[[aws autoscaling update-auto-scaling-group]] --auto-scaling-group-name my-asg --termination-policies OldestInstance</code> | ||
+ | * [[Launch configuration]] | ||
+ | |||
+ | * <code>[[aws autoscaling describe-termination-policy-types]]</code> | ||
+ | |||
+ | == Related == | ||
* [[Lifecycle]]: [[spot]] | * [[Lifecycle]]: [[spot]] | ||
+ | * <code>[[An instance was taken out of service in response to a EC2 health check indicating it has been terminated or stopped]]</code> | ||
+ | * [[AWS CloudTrail]] | ||
+ | * <code>[[aws cloudtrail lookup-events]] --lookup-attributes AttributeKey=EventName,AttributeValue=TerminateInstances</code> | ||
== See also == | == See also == |
Latest revision as of 10:41, 16 January 2024
Terminated[edit]
In AWS, when an instance is terminated, it is no longer running and cannot be restarted. The amount of time that a terminated instance remains visible in the AWS Management Console depends on the retention period set for the Auto Scaling group or the EC2 instance. The default retention period is one hour, but it can be configured to be up to seven days. Once the retention period has expired, the terminated instance is permanently deleted and is no longer visible in the AWS Management Console. Ref: ChatGPT
Two days, according to ChatGPT
aws autoscaling update-auto-scaling-group --auto-scaling-group-name my-asg --termination-policies OldestInstance
- Launch configuration
Related[edit]
- Lifecycle: spot
An instance was taken out of service in response to a EC2 health check indicating it has been terminated or stopped
- AWS CloudTrail
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=TerminateInstances
See also[edit]
- AWS EC2, Amazon EC2 API,
aws ec2, AWS::EC2
, Amazon EC2 Spot Instances, CPU credits, Instance type, EC2 limitations, 169.254.169.254, Instance metadata and user data (IMDS),InstanceType, InstanceId
, Amazon EC2 Auto Scaling, AWS EC2 Instance Connect, launch template, lifecycle, AWS Security group (SG), Amazon EC2 Recycle Bin, Amazon EC2 Mac Instances, Global View
Advertising: