Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reducing the number of IAM API calls made during enable cross-account… #408

Merged
merged 3 commits into from
Dec 17, 2021

Conversation

StewartW
Copy link
Contributor

@StewartW StewartW commented Dec 1, 2021

… access

Issue #, if available: N/A

Description of changes:

I've changed the logic ever so slightly so that when enabling cross account access, it reduces the number of API calls in the deployment account. Currently it will update the IAM policies per region (3 x Number of regions), meaning that it increases the chances of being throttled.
This changes it to 3 API calls per account (or how many role/policy mappings are passed in).

I've tried to make the change backwards compatible, just incase customers have downstream modifications to this lambda

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

Copy link
Collaborator

@sbkok sbkok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestions only. Thanks for contributing this improvement!

@sbkok sbkok added the enhancement New feature or request label Dec 10, 2021
@sbkok sbkok added this to the v3.2.0 milestone Dec 10, 2021
Copy link
Collaborator

@sbkok sbkok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link

@krisnielander krisnielander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sbkok sbkok merged commit 319eb04 into awslabs:master Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants