This workflow finds empty ELBv2 load balancers by locating all load balancers that have empty target groups (i.e. no registered targets).
Before you run this workflow, you will need the following:
- An AWS account.
- An AWS IAM user with permissions to list and delete ELBv2 load balancers (if not run in dry run mode).
- One or more ELBv2 load balancers that are empty (no targets).
Run the workflow
Follow these steps to run the workflow:
1. Add your AWS credentials as a Connection:
- Click Setup
- Find the Connection named
my-aws-accountand click Edit(✎). Use the following values:
ACCESS KEY ID
- VALUE: Enter your AWS access key id associated with the account
SECRET ACCESS KEY
- VALUE: Enter your AWS secret access key associated with the account
- Click Save
- Click Run workflow and wait for the workflow run page to appear.
Supply following parameters to the modal:
- VALUE: The AWS region to run in
- VALUE: True if you don't want to perform actual WRITE operations
Warning: If you run the workflow with the
dryRunparameter set to
false, load balancers that are empty will immediately be deleted.
Run the workflow on a schedule
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) or
Ctrl + /(Windows) to uncomment.
# triggers: # - name: schedule # source: # type: schedule # schedule: '0 * * * *' # binding: # parameters: # region: us-east-1 # dryRun: true
- Configure the
- Supply the run interval in cron format.
- Configure the following parameter bindings:
- Specify the
regionto run in.
- Specify whether
dryRunshould be set to
- Specify the
- Click Save changes