EC2 Stop Instances by TagName
Amazon Web Services (AWS)’s Elastic Compute Cloud (EC2) is a commercial web service that allows users to rent virtual computers. Using AWS EC2’s cloud infrastructure, you can build powerful servers in the cloud. This service completely eliminates the need to set up and invest in hardware, enabling you to deploy your apps quickly. With AWS EC2, you can set up servers, configure networking and security, and manage storage.
An instance is nothing but a virtual machine. AWS offers a variety of instance types, which are various combinations of CPU, storage, memory, networking capacity, and so on.
If you are already using EC2 instances, which have attached EBS volumes (block level storage), and you do not remember its ID, but just the tag name, you can use this action to stop an instance or multiple instance by tag name. To do this, you first need to configure the action, and select the required AWS connection. Select the region in which your EC2 instance resides. Then provide the tag name of the instance that you wish to stop. If you want to stop multiple instances at once, click on ‘+ Tag Name’ to add more instances.
You can also perform a dry run before the instances are stopped. This dry run will check if you have the required permissions to start an instance.
Before stopping an instance, it is important to ensure that it is stopped in a state from where it can be easily restarted. Stopping an instance wipes out the data stored in RAM.
Once you have entered all the required details, click on ‘Done’ and run the workflow. This will stop the specified EC2 instance.
Output:
-
EC2 Stop Instances by TagName
-
StoppingInstances array
InstanceId string
CurrentState object
-
count number
-