Before you run this workflow, you will need the following:
- An AWS account.
- An AWS IAM user with permissions to list and delete EBS volumes (if not run in dry run mode).
- One or more running EBS volumes that are unattached.
Follow these steps to run the workflow:
-
Add your AWS credentials as a Connection:
- Click Setup
- Find the Connection named
my-aws-accountand click Edit(✎). Use the following values:- KEY:
ACCESS KEY ID - VALUE: Enter your AWS access key id associated with the account
- KEY:
SECRET ACCESS KEY - VALUE: Enter your AWS secret access key associated with the account
- KEY:
- Click Save
-
Click Run workflow and wait for the workflow run page to appear.
-
Supply following parameters to the modal:
- KEY:
region - VALUE: The AWS region to run in
- KEY:
dryRun - VALUE: True if you dont want to actually delete the resources. Use this to test the workflow and ensure it is behaving as expected.
- KEY:
-
Warning: If you run the workflow with the
dryRunparameter set tofalse, volumes that are unattached will immediately be terminated.
Follow these steps to run this workflow on a schedule:
- Un-comment out the Trigger block in the workflow file:
TIP: If you're using the Relay code editor, highlight the
triggerssection and type⌘ + /(Mac) orCtrl + /(Windows) to uncomment.
# triggers:
# - name: schedule
# source:
# type: schedule
# schedule: '0 * * * *'
# binding:
# parameters:
# region: us-east-1
# dryRun: true
# lifetimeTag: lifetime
# terminationDateTag: termination_date- Configure the
scheduletrigger:- Supply the run interval in cron format.
- Configure the following parameter bindings:
- Specify the
regionto run in. - Specify the
lifetimeTagto use. - Specify the
terminationDateTagto use. - Specify whether
dryRunshould be set totrueorfalse.
- Specify the
- Click Save changes