inspec / inspec-aws

InSpec AWS Resource Pack https://www.inspec.io/
Other
136 stars 105 forks source link

Add Lazy Loading to Controls #846

Open jnikles1 opened 2 years ago

jnikles1 commented 2 years ago

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:

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.