ARC - AWS Resource Collector

Work in Progress
ARC is a command-line tool for collecting AWS resource information across multiple services and regions, generating organized CSV files and an interactive HTML viewer for easy browsing.
Features
- π Fast & Concurrent - Parallel collection of resources with configurable concurrency
- π Multiple Output Formats - CSV files and interactive HTML viewer
- π Comprehensive Coverage - Support for 20+ AWS services
- π Multi-Region Support - Collect resources from multiple AWS regions
- π― Selective Collection - Choose specific resource categories to collect
- π Organized Output - Automatically organized by AWS account ID and resource type
Screenshots
Interactive HTML Viewer
ARC generates an interactive HTML viewer that allows you to browse collected resources with ease:
Interactive HTML viewer showing AWS resources organized by service category
The HTML viewer features:
- π Category Panels - Collapsible panels for each AWS service
- π Search & Filter - Filter categories by name
- π DataTables Integration - Sort, search, and paginate within each table
- πΎ Download Options - Download individual CSV files or the combined CSV
- π Column Locking - Lock columns for easier horizontal scrolling
- π± Responsive Design - Works on desktop and mobile browsers
Table of Contents
Installation
Using Go Install
go install github.com/y-miyazaki/arc/cmd/arc@latest
From Source
git clone https://github.com/y-miyazaki/arc.git
cd arc
go build -o arc ./cmd/arc
sudo mv arc /usr/local/bin/
Using Release Binary
Download the latest binary from the Releases page.
Release binaries are available for:
- Linux (amd64, arm64)
- macOS (amd64, arm64)
- Windows (amd64)
# Example for Linux AMD64
VERSION=v1.0.0 # Replace with desired version
wget https://github.com/y-miyazaki/arc/releases/download/${VERSION}/arc-${VERSION}-linux-amd64.tar.gz
tar -xzf arc-${VERSION}-linux-amd64.tar.gz
sudo mv arc /usr/local/bin/
chmod +x /usr/local/bin/arc
# Example for macOS ARM64 (M1/M2/M3)
VERSION=v1.0.0 # Replace with desired version
curl -LO https://github.com/y-miyazaki/arc/releases/download/${VERSION}/arc-${VERSION}-darwin-arm64.tar.gz
tar -xzf arc-${VERSION}-darwin-arm64.tar.gz
sudo mv arc /usr/local/bin/
chmod +x /usr/local/bin/arc
Verify Installation
arc --version
Quick Start
- Configure AWS Credentials
# Using AWS CLI
aws configure
# Or set environment variables
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_DEFAULT_REGION=ap-northeast-1
- Collect All Resources
arc
- View Results
# CSV files will be in ./output/{account-id}/resources/
ls -lh ./output/*/resources/
# Open HTML viewer in browser
open ./output/*/index.html
Usage
Basic Commands
# Collect all resources in default region
arc
# Collect all resources with HTML output
arc --html
# Collect specific categories
arc -c ec2,s3,lambda
# Collect from specific region
arc -r us-east-1
# Collect from multiple regions
arc -r ap-northeast-1,us-east-1,eu-west-1
# Use specific AWS profile
arc --profile production
# Set output directory
arc -D /path/to/output
# Enable verbose logging
arc -v
Command-Line Options
OPTIONS:
--verbose, -v Enable verbose output
--region, -r value AWS region(s) to use (comma-separated) (default: "ap-northeast-1") [$AWS_DEFAULT_REGION]
--profile value AWS profile to use [$AWS_PROFILE]
--output, -o value Output filename (default: "all.csv")
--output-dir, -D value Base output directory (default: "./output")
--categories, -c value Comma-separated list of categories to collect
--html, -H Generate HTML index (default: false)
--concurrency, -C value Maximum number of concurrent AWS API requests (default: 5)
--help, -h show help
Supported AWS Services
| Service |
Category Name |
Description |
| ACM |
acm |
Certificate Manager |
| API Gateway |
apigateway |
REST and HTTP APIs |
| Batch |
batch |
Batch computing |
| CloudFormation |
cloudformation |
Infrastructure as Code stacks |
| CloudFront |
cloudfront |
Content Delivery Network |
| CloudWatch Alarms |
cloudwatch_alarms |
Monitoring alarms |
| CloudWatch Logs |
cloudwatch_logs |
Log groups and streams |
| Cognito |
cognito |
User pools and identity pools |
| DynamoDB |
dynamodb |
NoSQL database tables |
| EC2 |
ec2 |
Virtual machines and related resources |
| ECR |
ecr |
Container registry |
| ECS |
ecs |
Container orchestration |
| EFS |
efs |
Elastic File System |
| ElastiCache |
elasticache |
In-memory cache |
| ELB |
elb |
Load balancers (ALB, NLB, CLB) |
| EventBridge |
eventbridge |
Event buses and rules |
| IAM |
iam |
Identity and Access Management |
| KMS |
kms |
Key Management Service |
| Lambda |
lambda |
Serverless functions |
| RDS |
rds |
Relational databases |
| Redshift |
redshift |
Data warehouse |
| S3 |
s3 |
Object storage |
| Secrets Manager |
secretsmanager |
Secrets storage |
| SNS |
sns |
Simple Notification Service |
| SQS |
sqs |
Simple Queue Service |
| VPC |
vpc |
Virtual Private Cloud and networking |
| WAF |
waf |
Web Application Firewall |
Directory Structure
output/
βββ {account-id}/
βββ index.html # Interactive HTML viewer
βββ files.json # Manifest for HTML viewer
βββ resources/
βββ all.csv # Combined CSV of all resources
βββ ec2.csv # EC2-specific resources
βββ s3.csv # S3-specific resources
βββ ... # Other service-specific CSVs
Each CSV file contains:
- Category - Service category (e.g., ec2, s3)
- Subcategory - Resource type (e.g., Instance, Bucket)
- Subsubcategory - Additional classification
- Name - Resource name
- Region - AWS region
- Service-specific attributes
HTML Viewer
The interactive HTML viewer provides:
- π Search and filter across all resources
- π Sort by any column
- π Per-category collapsible panels
- πΎ Download CSV files
- π Fixed column scrolling
- π± Responsive design
Configuration
Environment Variables
AWS_ACCESS_KEY_ID - AWS access key
AWS_SECRET_ACCESS_KEY - AWS secret key
AWS_SESSION_TOKEN - AWS session token (for temporary credentials)
AWS_DEFAULT_REGION - Default AWS region
AWS_PROFILE - AWS profile name
AWS Permissions
The tool requires read-only permissions for the services you want to collect. Example IAM policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"acm:List*",
"acm:Describe*",
"apigateway:GET",
"cloudformation:List*",
"cloudformation:Describe*",
"cloudfront:List*",
"cloudfront:Get*",
"cloudwatch:Describe*",
"dynamodb:List*",
"dynamodb:Describe*",
"ec2:Describe*",
"ecr:Describe*",
"ecs:List*",
"ecs:Describe*",
"elasticache:Describe*",
"elasticloadbalancing:Describe*",
"events:List*",
"events:Describe*",
"iam:List*",
"iam:Get*",
"kms:List*",
"kms:Describe*",
"lambda:List*",
"lambda:Get*",
"rds:Describe*",
"redshift:Describe*",
"s3:List*",
"s3:Get*",
"secretsmanager:List*",
"secretsmanager:Describe*",
"sns:List*",
"sns:Get*",
"sqs:List*",
"sqs:Get*",
"wafv2:List*",
"wafv2:Get*"
],
"Resource": "*"
}
]
}
Examples
Collect Specific Resources
# Only EC2 instances and S3 buckets
arc -c ec2,s3
# Only Lambda functions with HTML output
arc -c lambda --html
# DynamoDB tables in multiple regions
arc -c dynamodb -r ap-northeast-1,us-east-1
Multi-Account Collection
# Collect from production account
arc --profile production -D ./output/production
# Collect from staging account
arc --profile staging -D ./output/staging
# Collect from development account
arc --profile development -D ./output/development
CI/CD Integration
# Example GitHub Actions workflow
# SECURITY NOTE: Using IAM roles (OIDC) is strongly recommended over access keys.
# See: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
name: AWS Resource Inventory
on:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday
jobs:
collect:
runs-on: ubuntu-latest
# Recommended: Use OIDC with IAM role
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Install arc
run: go install github.com/y-miyazaki/arc/cmd/arc@latest
# Recommended: Configure AWS credentials with IAM role (OIDC)
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubActionsRole
aws-region: ap-northeast-1
# Alternative (NOT RECOMMENDED): Using access keys
# Only use this if IAM roles are not available
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v2
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ap-northeast-1
- name: Collect resources
run: arc --html
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: aws-inventory
path: output/
Development
For development guidelines, building from source, testing, and contributing to the project, please see CONTRIBUTING.md.
License
Apache License 2.0 - see LICENSE for details.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines on how to contribute to this project.
Support