aws-samples / aws-control-tower-guardduty-enabler

Apache License 2.0
41 stars 26 forks source link

Fix iterating over more than one page of accounts #13

Closed awilkins closed 4 years ago

awilkins commented 4 years ago

If you had more than the default MaxResults worth of accounts iteration over the results was broken

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

cornickj commented 4 years ago

Thanks @awilkins for your PR. Can you please confirm: "By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice."

I thought we actually fixed the pagination in issue #2 but will do some more testing. How many accounts are in your Organization that was having issues?

cornickj commented 4 years ago

@awilkins without your consent to the licensing terms I have to close this request.

awilkins commented 4 years ago

Apologies, only just seen the copyright attribution message. Edited PR description.

From memory this was more to do with the behaviour of lists in Python ; the variable was getting replaced, not extended.

For reference my client has 58 accounts.