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.
Playbook Files
Running this Playbook
- Click download playbook
- Import the downloaded file via the Playbooks page on PPA
- Build the playbook from the Edit & Build tab
- Run the playbook from the Preview & Deploy tab
Integrations
- PPA User Interface & Events
- Hashicorp Vault Key-Value engine
- AWS EC2 Instances
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.
Required Vault Details
AWS
- Access key ID
- Secret access key
The key must have permissions to read instance details from EC2.
Vault Configuration Wizard
The first time you run a task built from this playbook, PPA will check the required Vault details exist.
If they don't exist, PPA will ask you to supply the details at the start of the task.
Below you can see a user providing details the first time they run an Active Directory task.
Once the details are added to Vault, the task won't ask for them again.
If you don't know the required details, ask an administrator to run the task or configure Vault manually.
API/Schedule Payload
To run this task from a schedule or API call, you'll need to supply the following in the payload:
- The EC2 region
- Reporting email address
The payload should be in this format:
{
"ec2_region": "ec2-region-name",
"email_recipient": "example@domain.com",
}
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:
Get PPA for free!
Start automating your estate with a free 30 day trial today. No signup required!
Get PPA ExpressDocumentation
Installation Guide
See how easy it is to get started with our installation guide
Playbooks
View our task writing reference guide
Plugins
See how to integrate with different systems using our plugins reference guide.