View Untagged EC2 Instances

This task reports on untagged EC2 instances from all VPCs in a chosen region.

You can run this task interactively, from a schedule, or via an API call to PPA.

It requires an AWS API key that has permissions to read instance details from EC2.

Integrations

Required PPA Configuration

If you run start this task from a schedule or API call, the untagged instance report will be sent via email.

When started interactively the user will have the choice to email the report.

To email this report you must have SMTP configured in PPA.

Note: The email will be sent to the default recipient in the PPA SMTP configuration.

Required Vault Details

AWS

  • Access key ID
  • Secret access key

The key must have permissions to read instance details from EC2.

PPA will add these to Vault for you when you first run the task (see Vault Config Wizard for more).

API/Schedule Payload

To run this task from a schedule or API call, you'll need to supply the EC2 region in the task payload.

The payload should be in this format:

{"ec2_region": "ec2-region-name"}

You can use the example payload above as a template.

What the Task Does

Interactive

When run interactively this task will:

  • Ask the user to select an EC2 region
  • Find all untagged EC2 instances in the selected region
  • Display them in a table
  • Ask the user whether to send the report in an email

Schedule/API

When started from a schedule or API call, this task will:

  • Find all untagged EC2 instances in the region defined in the task payload
  • Display them in a table
  • Send the report in an email

Audit Failure Messages (optional)

This task can supply a message to the Activity page if sending the report email fails.

To test this do the following in PPA after you've built & tested the task:

  • Navigate to the Playbook Editor
  • Click the burger menu for your Playbook
  • Select Edit Metadata
  • Expand the Advanced section
  • Paste the JSON below into the Exit Codes section
  • Click Save
{
  "2": "Failed to send email report. SMTP is not configured in PPA.",
  "3": "Failed to send email report. Please view the logs for more information."
}

You can see how this is done below:

set-exit-codes

View playbook on Github
Product Boot Screen

Get PPA for free!

Start automating your estate with a free 30 day trial today. No signup required!

Get PPA Express

Documentation


Theale Court
11-13 High Street, Theale
Reading, Berkshire, RG7 5AH
United Kingdom
+44 (0) 118 324 2444

Logo

Copyright 2020 Osirium Ltd.