Spotlight
Guidance for Technical Leadership
A brief exploration of evidence-based approaches to Technical Leadership and Performance Evaluations.
Today, Trek10 is releasing AWSets, a new open source utility for crawling an AWS account and exporting all its resources for further analysis.
Every day, Trek10 interfaces with numerous environments across multiple clients. This presents unique problems often without known solutions, which leads us to build our own. One such example of this is Awsume.
In this instance, Trek10 frequently gets pulled into existing AWS accounts that lack documentation, don’t practice proper tagging, don’t use infrastructure as code, or just contain so many resources that it’s difficult to get an understanding of what we’re working with. Unfortunately, there is no single AWS call or service that can provide a complete assessment of everything in an account so that we can start to piece together a map of what is going on.
When we started searching for solutions, we came across many tools that were written to address this need. They varied greatly in resource coverage, approaches, and contributor activity. While there are some useful implementations in this space, we were unable to identify any at the time that met the same goals we were aiming for, and the ones that were the closest were not easy to extend. Some tools stopped at supporting a few dozen resources. Others took an automated approach to calling functions from the SDKs and were difficult to override when necessary. Most importantly though, none of them included one of most important aspects, which is how all the resources relate to each other.
After falling short on existing solutions, we decided to explore what it would take to implement something new. We had learned quite a few things from our research and also from the pain points we’ve had with working in the AWS ecosystem for so long. Some goals that we wanted to accomplish include:
The result of this work is AWSets, a CLI tool written in Go. The GitHub page includes a full README on installation and usage, but a few highlights include:
The output data is a JSON array, with each object in the following format:
{
"Account": "123456789", // account resource is in
"Region": "us-east-1", // region resource is in
"Id": "12345", // resource id
"Version": "", // resource version
"Type": "ec2/instance", // resource type
"Name": "test-instance", // resource name
"Attributes": {}, // full dump of resource attributes
"Tags": {}, // normalized tags for resource
"Relations": [ // array of the identifiers of related resources
{
"Account": "123456789",
"Region": "us-east-1",
"Id": "vpc-123abc123",
"Version": "",
"Type": "ec2/vpc"
}
]
}
The intention of this design is to make it easy to use with specialized JSON processing tools such as jq or jmespath.
AWSets also includes a rudimentary DOT file generator, though it may eventually be split out as it increases in complexity. Resources that are referenced in a relationship but not present in the account show up as red, making it easy to find orphaned resources. For example, this image shows a network stack that was created to support Redshift testing. The Redshift cluster was removed (the expensive part), but the supporting infrastructure was not. We can also see these supporting resources are not used by other things.
Each region is rendered in it’s own subgraph, making it easy to get a quick visual of which regions are being used. In this image, items in yellow are resources without known relations, and are usually defaults, such as default roles, RDS parameter groups, etc.
While this initial release is quite powerful and useful, there is a lot more work to be done, including:
As mentioned before, you can head over to the project on GitHub for information on installing and using AWSets. Try it out and file issues or PRs for any issues you encounter or additional resources you need supported. At Trek10, AWSets is being used as a base utility for powering several internal tooling - by open sourcing this, we're excited to see what the community can come up with!
A brief exploration of evidence-based approaches to Technical Leadership and Performance Evaluations.