inspec / inspec-aws

InSpec AWS Resource Pack https://www.inspec.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Lazy Loading to Controls

jnikles1 opened this issue · comments

Performance benefits can be seen in controls which make multiple API calls in the background, when lazy loading is implemented.

Detailed Description

a list of some controls which would benefit from this:

  • aws_iam_users
  • aws_iam_user
  • aws_s3_bucket
  • aws_alb
  • aws_cloudformation_template
  • aws_elb
  • aws_hosted_zone
  • aws_iam_access_keys
  • aws_kms_key

Context

When faced with a high number of aws resources for a specific inspec resource, making multiple api calls in the initialization of the inspec resource can cause performance degradation. Lazy loading will allow these API calls to be used only when necessary

Possible Implementation

The aws_s3_buckets resource can be used as an example implementation.