[Music]
[Applause]
[Music]
hello i am saurabh a cloud support
engineer here at aws office in northern
virginia today i am going to show you
how to list the active amazon elastic
compute cloud resources using aws
systems manager automation document and
then delete or terminate the active
resources let's get started
before we start let's check the aws
regions where the active ec2 resources
are present by checking your monthly
billing and cost management console
open the billing and cost management
console from your primary account
then select the elastic compute cloud
option
here you can see the aws regions where
the ec2 resources are located
along with the name of the resources
now we use the aws support list ec2
resources aws systems manager automation
document to list the active ec2
resources
this automation document returns
information on ec2 instances and related
resources such as amazon elastic block
store volumes elastic ip addresses and
amazon ec2 auto scaling groups from the
aws regions that you specify
by default the information is gathered
from all regions and appears in the
output
to run the document follow these steps
in the aws management console open the
systems manager service
from the left navigation pane under
change management choose automation
in the execution section select execute
automation
in the search automation document tab
search for aws support list ec2
resources
and then select the document
the next page provides you all the
information about the document and the
api calls that will be performed in your
aws account
select execute automation
next in the execute automation document
page select the type of execution
here i will select simple execution
below choose the appropriate selection
for input parameters and tags
and then select execute
next find the executed steps and their
status
in the execution status section check
that the overall status is success
after the status has changed to success
select the outputs tab
you will see the resources associated
with the ec2 instances along with the
regions where the resources are present
now to terminate the resources follow
the steps
after you identify the resources from
the output section go ahead and delete
the unnecessary resources
i will terminate the auto scaling group
frankfurt underscore asg residing in eu
central 1 region
in the ec2 service page on the aws
console select the auto scaling groups
option located in the left navigation
pane
select the desired auto scaling group
and choose delete
all the ec2 instances launched under
this auto scaling group will be
terminated
you can check the aws cost and usage
report or aws cost explorer to confirm
that the resources are no longer
generating charges
so now you know how to use the aws
systems manager automation document to
list all the active ec2 resources and
then terminate them thanks for watching
and happy cloud computing from all of us
here at aws
[Music]
[Applause]
[Music]