Repository: turbot/steampipe-plugin-aws (language: go)

Issue:
MaxItems for aws_iam_policy should be 1000, not 100
The max items default for aws_iam_policy is currently 100:

https://github.com/turbot/steampipe-plugin-aws/blob/3cc0721e4b0cca1a8ec721c4627ca8030448a063/aws/table_aws_iam_policy.go#L168

But the API indicates 1000 is the maximum allowed? I think we should use 1000 to reduce the number of required API calls - particularly since this API appears to be heavily throttled.

https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicies.html#API_ListPolicies_RequestParameters


Discussion / hints:

Fix patch:
diff --git a/aws/table_aws_iam_policy.go b/aws/table_aws_iam_policy.go
index 71ebd7331..ebeed7572 100644
--- a/aws/table_aws_iam_policy.go
+++ b/aws/table_aws_iam_policy.go
@@ -165,7 +165,7 @@ func listIamPolicies(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate
 	}
 
 	params := buildIamPolicyFilter(d.EqualsQuals, d.Quals)
-	maxItems := int32(100)
+	maxItems := int32(1000)
 
 	// If the requested number of items is less than the paging max limit
 	// set the limit to that instead


Test patch: