terminate instance aws cli. If you selected multiple clusters, then choose Turn off. terminate instance aws cli

 
 If you selected multiple clusters, then choose Turn offterminate instance aws cli Description ¶

If you have tasks running on the container instance when you deregister it with the force option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). To enable instance scale-in protection (AWS CLI)When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. This parameter is not supported for tenancy is not supported for or for T3 instances that are configured for the. Volumes attached after instance launch continue running. As mentioned in the comments, I suggest working with AWS Powershell Module. Instances[?!contains(Tags[]. On the Cluster List page, select the cluster or clusters to terminate. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. Elastic Beanstalk might fail to terminate your environment. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide. Using Amazon EC2 eliminates the need to invest in hardware up front, so you can develop and deploy applications faster. The following shows the expected output. Step-7: Terminate EC2 instance. As you can see, there's not even a mention of winding down my service during instance stop. Deleted environments can't be recovered. If you choose to terminate the instances, the Spot Fleet request enters the cancelled_terminating state. Terminated instances remain visible after termination (for approximately one hour). You can only terminate instance store-backed instances. If you request a final DB snapshot, the status of the Amazon RDS DB instance is deleting until the DB snapshot is created. You can access the features of Amazon Elastic Compute Cloud (Amazon EC2) using the AWS Command Line Interface (AWS CLI). The Amazon CLI is a command-line interface that allows customers to control AWS resources such as EC2 instances. We will use the tag to search for the instance and then pass the instance-id to the terminate-instances EC2 call. If termination protection is on. Then use aws ec2 terminate-instances like you are doing. aws autoscaling delete-auto-scaling-group --auto-scaling-group-name my-asg. Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts. To verify the root device type of an instance, you can use the Amazon EC2 console or the AWS CLI. To specify which instances Amazon EC2 Auto Scaling should terminate first, choose a termination policy. You can only terminate instance. See the following AWS docs as a reference: AWS Docs - Cancel Spot Instance. Terminate the instance using the AWS Command Line Interface (AWS CLI). To view this page for the AWS CLI version 2, click here . 05 Click on the Actions dropdown button from the console top menu, choose Instance settings, and select Change termination protection. amazon-ec2; command-line-interface; aws-sdk; aws-cli; or ask your own question. Rather than asking the Amazon EC2 service to terminate an instance, you can simply call the Operating System and tell it to Stop the instance:. If you decrement the desired capacity, your Auto Scaling group can become unbalanced between Availability Zones. Use one of the following methods to remove terminated instances from your EC2 Auto Scaling group that are still listed as Healthy and InStandby: Use the AWS Command Line Interface (AWS CLI) to terminate the instance. ← delete-listener. Replace i-1234567890abcdef0 with the actual InstanceId of the EC2 instance you wish to terminate. You can only terminate instance. Take the instance out of the standby. The script below will require instance ids. The AWS CLI gives as an easy way for generating keys: $ aws ec2 create-key-pair --key-name BaeldungKey --output text > BaeldungKey. Volumes attached after instance launch continue running. The service supports homogeneous migrations such. instanceName. Amazon EC2 console. Description ¶. Terminate the EC2 instances when the processing is complete. 20. For more information on what to expect when you switch to the old console, see Using the old console. Share. This terminate-session example permanently ends a session that was created by the user "Shirley-Rodriguez" and closes the data connection between the Session Manager client and SSM Agent on the instance. If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are terminated. Although an instance stack in Pending state cannot be managed through AWS console, using the AWS CLI allows you to stop it and start it again. aws opsworks stop-instance --region us-east-1 --instance-id 3a21cfac-4a1f-4ce2-a921. In the Amazon EC2 console, open the Instances pane and select an instance. The Size list contains the currently supported types. delete-rule →. By default, the AWS CLI uses SSL when communicating with AWS services. For more information see the AWS CLI version 2 installation instructions and migration guide. Create a t. Previously, you could use one of the predefined termination policies to determine which instances Auto Scaling would terminate. --cli-input-json (string) Performs service operation based on the JSON string provided. For example, when the intances are busy, a scaling policy can automatically launch additional instances ("scale-out"). DynamoDB. If I use describe-instances, I can filter by. Use the AWS Command Line Interface (AWS CLI) to terminate the instance. Amazon EC2 Auto Scaling tries to rebalance the group, and rebalancing might terminate instances in other zones. 45 Python/2. Detach the instance from the EC2 Auto Scaling group. Description ¶. The command also applies a tag with a key of cost-center and a value of cc123 to any EBS volume that's created (in this case, the root volume). Select the instance, and choose Actions, Instance Settings, Change Termination Protection. Now, lets imagine that the price for a t2. AWS CLI Command to Create ec2 Instance With User Data. Latest AWS CLI allows you to avoid the need for any scripts or jq: aws ec2 terminate-instances --instance-ids $ (aws ec2 describe-instances --query 'Reservations []. These are just a few examples of utilizing filters in the AWS CLI to narrow down and manage your EC2 instances. These examples will need to be adapted to your terminal's quoting rules. To better understand the differences between the two volume types, see Storage options for your Amazon EC2 instances. Copy the S3 objects to the EC2 instances using the AWS CLI aws s3 cp command. If you suspend either the Launch or Terminate process types, it can prevent other process types from functioning properly. 4. id,Attribute = 'disableApiTermination') code above lists only instances from us-east-1 and if passed instanceID not from that region then it complains (instance not. Volumes attached after instance launch continue running. 5. Flow diagram of possible life cycles of EC2 instances: Image from AWS Documentation: Lifecycle state transitions for instances in a warm pool Choose Clusters, and then choose the cluster you want to terminate. Turn on debug logging. If the instance is online, you must first stop the instance by. I followed this doc where it explains that I need to run the command: aws rds stop-db-instance --db-instance-identifier mydbinstance however, when I do that I get this: usage: aws [options] <command> <subcommand> [<subcommand. When an instance is terminated, the instance status changes to terminated. At the prompt, choose Terminate. Once you have terminated the AWS instance, it. By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. 11 Command Reference. describe_instance_attribute (InstanceId =instance. If other arguments are provided on. Description ¶. By default, its value is True for the root volume and False for the other volumes. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Syntax: "string" "string". Terminate instances. aws ec2 terminate-instances--instance-ids instance_id (Optional) If you are finished with the Amazon S3 bucket that you uploaded the bundle to, you can delete the bucket. For more information see the AWS CLI version 2 installation instructions and migration guide . And you can trigger this script in case of any error/event is encountered. : Environment is available to have an action performed on it, such as update or terminate. You can’t connect to or start an instance after you’ve terminated it. Status -> (string) : Environment is in the process of initial deployment. AWS Collective See more. You can associate one or more instances with an event window. Change the --start-time (start recording date) and --end-time (stop recording date) parameters values to choose your own time frame for. Click here to learn more about managing EC2 instances from using the aws-cli. 3) API (Application Program. If you suspend either the Launch or Terminate process types, it can prevent other process types from functioning properly. By default, Amazon EC2 Auto Scaling balances instances across all Availability Zones. terminate_protection=client. Deletes a previously provisioned DB instance. InstanceId' --filters "Name=tag:tagkey,Values=tagvalue" --output text) as long as the number of expected instances is not huge, the above can be used. Cancels the specified Spot Fleet requests. Create a New Key Pair for EC2 Instances. Improve this answer. resource ('ec2') ids = ['string'] #insert instance ids separated by commas. 2. 20. For example to specify the instance class dms. This operation is idempotent; if you terminate an instance more than once, each call succeeds. These are just a few examples of utilizing filters in the AWS CLI to narrow down and manage your EC2. 9. To terminate an EC2 Instance from AWS CLI, run the following command where INSTANCEID is the instance id of the EC2 Instance. $ aws ec2 terminate-instances –instance-ids i-0e13c9d858a90fb9c i-07d3c83e849cb5c40See the Getting started guide in the AWS CLI User Guide for more information. I am passing the instance ID as an argument to the command using the ${var. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. New console. Detach instances (AWS CLI) Use the following procedure to detach an instance from your Auto Scaling. What happens to an instance differs if you stop it or terminate it. Select 'Terminate' under 'Instance State'. Instance C and Instance D fail to terminate because at least one of the specified instances in us-east-1b (Instance C) is enabled for termination protection. c4. instance-terminated is a paginated operation. Confirm the termination when prompted. You can stop, start, and terminate EBS-backed instances. Run shutdown -h now as root. Akhiri permintaan Anda. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target. If the instance was started more than 90 days ago: If you have Cloudtrail enabled and configured it to write to S3, then you can go through the Cloudtrail log and look for events related the instance id. 03 In the navigation panel, under Instances, choose Instances. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. What happens to an instance differs if you stop it or terminate it. To disable termination protection using the Amazon EC2 console, select the instance and then choose Actions, Instance Settings, Change Termination Protection. An EC2 Windows instance can be terminated only through AWS. Amazon EC2 Auto Scaling tries to rebalance the group, and rebalancing might terminate instances in other zones. You can stop, start, and terminate EBS-backed instances. - GitHub - awslabs/aws-simple-ec2-cli: A CLI tool that simplifies the process of launching, connecting and terminating an EC2 instance. Anda tidak dapat terhubung ke atau memulai proses setelah Anda IT. One common reason is that the security group of another environment has a dependency on the security group of the environment that you want to terminate. Deregisters an Amazon ECS container instance from the specified cluster. Volumes attached after instance launch continue running. Came across the below CLI commands to view and terminate the instances. Latest AWS CLI allows you to avoid the need for any scripts or jq: aws ec2 terminate-instances --instance-ids $ (aws ec2 describe-instances --query 'Reservations []. I have managed to get parts (1) and (2) working using the AWS CLI commands aws ec2 run-instances and aws ssm. By default, the AWS CLI uses SSL when communicating with AWS services. This versatile application provides customers with flexibility and automation, allowing them to save time and streamline their cloud infrastructure. You can stop, start, and terminate EBS-backed instances. $ aws ec2 terminate-instances --instance-ids i-1234567890abcdef0. Copy snapshot (unencrypted) to an encrypted copy using AWS Managed Key. If you want more practice, you could use the following to terminate the instances right from your IDE: import boto3. EC2 AWS Amazon: Stopping an instance. The target capacity for the fleet is 2 instances, and the default purchasing model is on-demand, which results in the fleet launching 2 On-Demand Instances. To learn more, see the following resources: Amazon EC2: Amazon EC2 product page, Amazon EC2 documentation To prevent Amazon EC2 Auto Scaling from terminating unhealthy instances, suspend the ReplaceUnhealthy process. are properly configured and all AWS credentials, certificate. now, i want, for all instances, to check if termination protection is enabled or not. (string) Syntax: "string" "string". delete the auto scaling by going to the left hand side of the EC2 dash board under AUTO SCALING > Auto Scaling Groups > select the check box Action > delete. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. In this tutorial, we are going to discuss all the possible ways to delete your EC2 instances. aws ec2 terminate-instances --instance-ids 'curl can force an instance to stop using the AWS CLI while the instance is in any state, except shutting-down and terminated. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. creationDateTime -> (string) The date and time. On the ‘Terminate Instances’ window, confirm by choosing ‘Yes, Terminate’. Navigate to Amazon EC2 Console. Delete the EC2 Fleet. Description ¶. ) For more information, see Enabling termination protection in the Amazon EC2 User Guide for Linux Instances. To modify the time range of an event window using the AWS CLI. To terminate an instance, you use the terminate-instances command: aws ec2 terminate-instances --instance-ids i-1234567890abcdef0 Replace i. terminate-instances¶. 0. anchor anchor anchor anchor. 0-12-generic, botocore version: 1. This operation is idempotent; if you terminate an instance more than once, each call succeeds. Amazon EMR uses Hadoop processing combined with several Amazon Web Services services to do tasks such as web indexing, data mining, log file analysis, machine learning, scientific simulation, and data warehouse management. You can create up to 200 event windows per Amazon Web Services Region. There are 2 types of CLI methods to delete an EC2 instance, as stated below. By default, Amazon EC2 Auto Scaling balances instances across all Availability Zones. $ aws configure. $ aws ec2 describe-instances $ aws ec2 start-instances --instance-ids i-1348636c $ aws sns publish -. --username (string) The name of the user who initiated the connection. To my knowledge there is no single CLI command to do this operation, as most AWS commands are inclusive, not exclusive. Volumes attached after instance launch continue running. if you really want to do this with CLI, you may first want to use aws autoscaling suspend-processes command to prevent ASG from creating new instances. Description ¶. Terminated instances remain visible after termination (for approximately one hour). Suspends the specified auto scaling processes, or all processes, for the specified Auto Scaling group. I am not looking for this. Planning to filter the instances created on a given date. I would perform this operation in four steps: First, use describe-instances to obtain a list of all instances. The following code examples show how to terminate an Amazon EC2 instance. JSON Syntax:. If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated. The range is from 30 to 7200 seconds. By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Once all that is done, you should be able use aws autoscaling. The request accepts the following data in JSON format. aws ec2 create-tags --resources i-dddddd70 --tags Key=Department,Value=Finance. Using terminate-instances (AWS CLI) AWS Command Line Interface lets you interact with AWS services using commands in the terminal. If a user attempts to delete a stack with termination protection enabled, the operation fails and the stack remains unchanged. Identify the instances that have been unused for a significant period. Description¶. 2. -2. From the AWS EC2 console, you can set its value when launching a new instance only. AWS Documentation AWS Command Line. Health check replacement if the instance fails health checks. For more information, see Delete an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide . When you delete an environment, AWS Cloud9 deletes the environment permanently. instances. To terminate active resources under different services, do the following: Open the AWS Management Console. By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running. Create an SQS queue for the termination messages. You can create a new EventBridge rule to be triggered upon terminate-instance to trigger an AWS Lambda function that will run detach-volume on it. By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. ** Edit ** Syntax: "string" "string". Wait until JMESPath query Reservations []. It may take a moment for the instance to fully terminate. Terminated instances remain visible after termination (approximately one hour). terminate ()To only list instances associated with a specific security group, you can use the “group-name” filter: aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" "Name=group-name,Values=my-security-group". For more information, see the AWS Elastic Beanstalk User Guide. The following code examples show how to terminate an instance in an Auto Scaling group. Use the refresh button until you see the status of your instance change to Successful. The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. AWS Instance Scheduler. On Ubuntu, you could set this up to happen in 55 minutes using:Create an AWS EC2 instance. aaaaaaaa111111111. You can disable pagination by providing the --no. However I would like to stop. describe-instances example filters the results to only those instances that are configured to allow access to instance tags from instance metadata. Follow the link if you are using a different OS. Run a Windows PowerShell script to remove the computer from the domain. Part of AWS Collective. To complete the lifecycle action. InstanceId' --filters "Name=tag:tagkey,Values=tagvalue" --output text) as long as the number of expected instances is not huge, the above can be used. response = ec2. In this case, I am using the aws ec2 terminate-instances command to terminate the specified instance. ; Iterate through the returned instances, concatenating each instance's ID onto a new variable instance-ids. For more information, see Suspending and resuming scaling processes in the Amazon EC2 Auto Scaling User Guide . Here we will use AWS CLI to delete the fleet. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide. On the ‘Terminate Instances’ window, confirm by. 2. Finally, on the next confirmation pop-up, choose Yes to confirm the termination of the AWS instance. Terminate Target instance by Tags. It still has an instance-id, but its virtual RAM is discarded, as are any ephemeral (also called instance) storage volumes (but not an EBS volumes). sudo shutdown now -h (The -h tells it to 'halt' the virtual hardware, which signals to the EC2 instance that the computer is now turned off, much like your home computer turns itself off after a. aws autoscaling put-warm-pool --auto-scaling-group-name <Name-of-autoscaling-group> --instance-reuse-policy ReuseOnScaleIn=true Reference docs for the command: AWS CLI Autoscaling put-warm-pool documentation. You can only terminate instance store-backed instances. Amazon EMR is a web service that makes it easier to process large amounts of data efficiently. Presumably, ASG instances must be terminated during scale in events. To better understand the differences between the two volume types, see Storage options for your Amazon EC2 instances. You can modify this value using AWS CLI only. If you want to filter to certain tag key/value only, you can edit the aws ec2 describe-instances to add a --filter option. c4. Should someone come up with a shorter solution, I would love to hear from you. For more information, see AWS. You can force an instance to stop using the AWS CLI while the instance is in any state, except shutting-down and terminated. {"string": "string". The following “aws ec2 terminate-instances” command will terminate the instance that is specified in the –instance-ids field. Skip directly to the demo: 0:32For more details see the Knowledge Center article with this video: instructions using the Amazon EC2 console, see Change the root volume to persist at launch using the console. Value -> (blob) Shorthand Syntax: JSON Syntax: "Value". You can stop, start, and terminate EBS-backed instances. If you request a final DB snapshot, the status of the Amazon RDS DB instance is deleting until the DB snapshot is created. 5+ Linux/3. By default, the AWS CLI uses SSL when communicating with AWS services. To accomplish this, customers may have been required to manually attach an IAM instance profile on a per-instance basis or use. You can only terminate instance store-backed. This name is not available until the instance enters the. The following modify-instance-attribute example adds the contents of the file UserData. If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated. 06 On the Change termination protection configuration. Locate the instance you wish to delete or terminate on the Instances page in the Amazon EC2 console. The maximum number of instances to launch. This example deletes the. Amazon Virtual Private Cloud (Amazon VPC) enables you to. (string) Syntax: "string" "string". Note By default, Amazon EC2 deletes the Amazon EBS root device volume at instance termination. Documentation: stop-instances — AWS CLI Command Reference. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above. key -> (string) value -> (string) Shorthand Syntax: KeyName1 = string, KeyName2 = string. To terminate an EC2 Instance from AWS CLI, run the following command where INSTANCEID is the instance id of the EC2 Instance. . For more information, see Amazon EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide. AWS CLI. For each SSL connection, the AWS CLI will verify SSL certificates. Select ‘Terminate’ under ‘Instance State’. --no-verify-ssl (boolean) By default, the AWS CLI uses SSL when communicating with AWS services. micro Amazon EC2 instance at closure. ← suspend-processes. 2micro EC2 instance with Ubuntu 22. You must terminate a network instance before you can delete it. Rebooting from cli however outputs my echo and system logs startup as well as shutdown of the service. autoscaling ¶. If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are terminated. Like what we do 'init 0' in linux and 'shutdown -s' in windows. You can create up to 200 event windows per Amazon Web Services Region. The JSON string follows the format provided by --generate-cli-skeleton. Terminated instances remain visible after termination (for approximately one hour). Default: trueAWS CLI 2. 1 Answer. Volumes attached after instance launch continue running. Select the unused instances you want to delete. PDF RSS. 01 per hour. Current : aws ec2 terminate-instances. --connection-id (string) The ID of the client connection to be terminated. You can stop, start, and terminate EBS-backed instances. The first time you create an alarm in the AWS Management Console, the AWS CLI, or the IAM API, CloudWatch creates the service-linked role for you. anchor anchor anchor anchor anchor. 1 Answer. Right-click on the instance, from the menu, choose Instance State –> Select Terminate option. By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Otherwise, go for the AWS CLI. Once all that is done, you should. Conclusion. Create the lifecycle hook. You can use the Amazon EC2 console to create alarm actions that stop or terminate an Amazon EC2 instance when certain conditions are met. A unique identifier for a game session placement to stop. Terminate the instance. This command produces no output. micro . 20 Python/3. Access the Amazon EMR console. Previously, you could use one of the predefined termination policies to determine which instances Auto Scaling would terminate. Login to AWS Management Console and navigate to EC2 dashboard. MaxCount (integer) – [REQUIRED] The maximum number of instances to launch. The ג€Actionג€ field does not grant the actions that are required to terminate the EC2 instance. Select the instance you would like to connect to, and click Connect. Description¶. Otherwise, you must provide base64-encoded text. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide . For example :By default, Amazon EC2 Auto Scaling balances instances across all Availability Zones. By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. 3. You can restart the instance in the future. Description ¶. micro is unavailable, you can use a t3. large, set this parameter to "dms. How to terminate EC2 instance using AWS CLI: >> aws ec2 terminate-instances --instance-id enterInstanceIdHere. You can stop, start, and terminate EBS-backed instances. If you use the AWS Management Console, Aurora automatically deletes your cluster when you delete the last DB instance in that cluster. For already running AWS EC2 instance, use AWS CLI. $ simple-ec2 terminate -h Terminate Amazon EC2 Instances, given the region and instance ids or tag values Usage: simple-ec2 terminate [flags] Flags: -h, --help help for terminate -n, --instance-ids strings The instance ids of the instances you want to terminate -i, --interactive Interactive mode -r, --region string The region in which the. Another (likely less popular) answer: Stop using the console. These will install curl so we can download directly the CLI files from a URL, unzip the CLI file and install the AWS CLI. clidriver - DEBUG - CLI version: aws-cli/1. You can obtain an instance ID by going to the instance's details page on the AWS OpsWorks console or by running the describe-instances command. By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. --endpoint-url (string) Override command's default URL with the given URL. Amazon EC2 Auto Scaling is designed to automatically launch and terminate EC2 instances based on user-defined scaling policies, scheduled actions, and health checks. I have been trying to stop multiple instances of RDS using a single command line but it does not seem to work. The script prompts for the token code and passes it to the aws cli operation aws sts assume-role [2] with parameters role-arn set to the arn of your role created in step (1), role-session-name set to an arbitrary value, serial-number set to the serial number of your mfa device and token-code set to the value you prompted the user for. To register a new instance, you must specify a value that's unique among instances that you register by using the same service. To delete the Auto Scaling group without waiting for the instances in the group to terminate, use the --force-delete option. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL. You can stop, start, and terminate EBS-backed instances. For example, if you are searching by the instance Name (which is actually just a Tag), use: aws ec2 describe-instances --filters Name. For example, when you stop an instance, the root device and any other devices attached to the instance persist. If hackers have disabled accidental instance termination, first run this command: aws ec2 describe-instances --filters "Name=instance-state-name,Values=pending,running,stopped,stopping" --query "Reservations []. I believe I do not have the following stated correctly:--actions-enabled --alarm-actions ec2:terminate Here is my full CLI command : aws cloudwatch put-metric-alarm --actions-enabled --alarm-actions ec2:terminate --alarm-name "High-CPU.