This script automates the discovery and counting of AWS resources to estimate licensing and log ingestion requirements for Palo Alto Networks Cortex Cloud.
It scans through your AWS environment and calculates counts for VMs, managed containers (CaaS), container images, serverless functions, PaaS databases, and S3 buckets.
The easiest way to run this script is directly from AWS CloudShell.
wget -qO aws-sizing-cc.sh https://raw.githubusercontent.com/PaloAltoNetworks/aws-sizing-script-cc/main/aws-sizing-cc.sh && chmod +x aws-sizing-cc.sh && ./aws-sizing-cc.sh -o -e sizing-report.csvgit -qO aws-sizing-cc.sh https://raw.githubusercontent.com/PaloAltoNetworks/aws-sizing-script-cc/main/aws-sizing-cc.sh && chmod +x aws-sizing-cc.sh && ./aws-sizing-cc.shAWS CloudShell is recommended as it comes pre-installed with the AWS CLI v2 and jq.
If running locally, ensure aws-cli and jq are installed and authenticated.
If you are scanning across your entire AWS Organization using the -o flag:
- You MUST run the script from the AWS Management Account.
- Your user/role needs the
organizations:ListAccountspermission. - Your user/role needs
sts:AssumeRolepermissions to assume the cross-account role (defaults toOrganizationAccountAccessRole) in the member accounts.
If you downloaded the script manually, you can run it with the following flags:
dot /aws-sizing-cc.sh [flags]| Flag | Description |
|---|---|
-o |
Organization mode (Recommended). Fetches all active sub-accounts and iterates through them. |
-e <file> |
Export to CSV. Generates a clean CSV file breaking down workload counts per account (e.g., -e output.csv). |
-n <region> |
Single region to scan (e.g., -n us-east-1). If omitted, it scans all enabled regions. |
-r <role> |
Specify a custom cross-account role to assume (default is OrganizationAccountAccessRole). |
-h |
Display help info. |
This script converts raw AWS resources into Cortex Cloud Workloads based on the following sizing ratios:
- VM Workloads (1:1): EC2 Instances, EKS Nodes
- Serverless Workloads (25:1): Lambda Functions
- CaaS Workloads (10:1): ECS Fargate Services, App Runner Services
- S3 Workloads (10:1): S3 Buckets
- PaaS Workloads (2:1): RDS, Aurora, DynamoDB, Redshift
- SaaS Workloads (10:1): AWS IAM Users
- Container Images: ECR images (subtracting allowances for existing VM/Node workloads)
Note: The script also counts AWS IAM Users as a baseline, but external SaaS users (e.g., Microsoft 365, Google Workspace) must be counted separately from their respective platforms.