Skip to main content
Splunk Lantern

Current AWS virtual private cloud infrastructure

As an administrator, you'd like to have a high level view of every Virtual Private Cloud (VPC) currently configured in AWS, as well as its current availability and Classless Inter-Domain Routing (CIDR) range.

Data required 

AWS description data

Procedure

  1. Configure the Splunk Add-on for Amazon Web Services.
  2. Ensure that your deployment is ingesting AWS data through one of the following methods:
    • Pulling the data from Splunk via AWS APIs. At small scale, pull via the AWS APIs will work fine.
    • Pushing the data from AWS into Splunk via Lambda/Firehose to Splunk HTTP event collector. As the size and scale of either your AWS accounts or the amount of data to be collected grows, pushing data from AWS into Splunk is the easier and more scalable method.
  3. Run the following search. You can optimize it by specifying an index and adjusting the time range.
source="*:vpcs" sourcetype="aws:description"
|dedup id sortby -_time
|table account_id region id cidr_block state
|sort +state

Search explanation

The table provides an explanation of what each part of this search achieves. You can adjust this query based on the specifics of your environment.

Splunk Search Explanation

source="*:vpcs"
sourcetype="aws:description"

Search only your VPC instances and filter by description data. 

|dedup id sortby -_time

Remove duplicate instances by ID and sort the remaining results with the most recent instances first. 

|table account_id region id cidr_block state

Display the results in a table with columns in the order shown.

|sort +state

Sort the results by state in ascending order.

Next steps

Sample results for this search are shown in the table below. It shows the number of unique VPCs associated with the account id, as well as the state, cidr_block, and the id of the eVPC itself. These are all fundamental attributes of a VPC. 

account_id region id cidr_block state

63605715280

ap-southeast-1

vpc-40c55125

10.95.0.0/16

available

63605715280

ap-southeast-1

vpc-311b8f54

10.0.0.0/16

available

63605715280

ap-southeast-1

vpc-d2d110ba

172.31.0.0/16

available

You might also be interested in other processes associated with the Managing an Amazon Web Services environment use case.