inspec / inspec-aws

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poorly Performing API Call in aws_s3_buckets Resource

jnikles1 opened this issue · comments

The aws_s3_buckets resource makes an additional call to get the tags of every bucket returned by the list_buckets method. This leads to poor performance when the list_buckets API returns many results.

Describe the problem

I would expect that the tags are not fetched in the plural resource, since the singular resource fetches the tags anyway.
image

Possible Solution

Remove the tags field from the plural resource. Allow the end user to fetch tags with the singular resource if they need the tags.

yes, this makes sense .. actually fetch_tags can be lazy loaded for a particular bucket if needed in plural resource!