Skip to content

[aws inventory] fix scanning all regions#90

Merged
ssoranno-lacework merged 1 commit into
lacework-dev:mainfrom
ericzinnikas:fix-getregions
Mar 10, 2026
Merged

[aws inventory] fix scanning all regions#90
ssoranno-lacework merged 1 commit into
lacework-dev:mainfrom
ericzinnikas:fix-getregions

Conversation

@ericzinnikas

Copy link
Copy Markdown
Contributor

getRegions function has no profile argument passed to it and fails as such:

$ ./lw_aws_inventory.sh -p Account123-RoleABC

"Profile", "Account ID", "Regions", "EC2 Instances", "EC2 vCPUs", "ECS Fargate Clusters", "ECS Fargate Running Containers/Tasks", "ECS Fargate CPU Units", "ECS Fargate License vCPUs", "Lambda Functions", "MB Lambda Memory", "Lambda License vCPUs", "Total vCPUSs"
Account123-RoleABC, 123456790,
You must specify a region. You can also configure your region by running "aws configure".
Regions: , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
######################################################################
Lacework inventory collection complete.

After this change, it properly scans all regions:

$ ./lw_aws_inventory.sh -p Account123-RoleABC

"Profile", "Account ID", "Regions", "EC2 Instances", "EC2 vCPUs", "ECS Fargate Clusters", "ECS Fargate Running Containers/Tasks", "ECS Fargate CPU Units", "ECS Fargate License vCPUs", "Lambda Functions", "MB Lambda Memory", "Lambda License vCPUs", "Total vCPUSs"
Account123-RoleABC, 123456790, ap-south-1 eu-north-1 eu-west-3 eu-west-2 eu-west-1 ap-northeast-3 ap-northeast-2 ap-northeast-1 ca-central-1 sa-east-1 ap-southeast-1 ap-southeast-2 eu-central-1 us-east-1 us-east-2 us-west-1 us-west-2, <snip>
######################################################################
Lacework inventory collection complete.

@gabeobrien gabeobrien left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 looks good

@ssoranno-lacework
ssoranno-lacework merged commit 612fec0 into lacework-dev:main Mar 10, 2026
@franzforti

Copy link
Copy Markdown

Do we not count RDS CPUs anymore? the previous script also gave as output the CPU count for RDS instances

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants