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

fix: Increase PageSize of ListPolicies Paginator #2033

Merged
merged 1 commit into from
May 18, 2021

Conversation

jfuss
Copy link
Contributor

@jfuss jfuss commented May 18, 2021

SAM runs within a Lambda function and loads IAM Managed Policies once per
Lambda. Previous to this, SAM would call IAM 9 times which could cause
throttling by IAM. With this change, we update the MaxItems from the
default of 100 to the max (1000). In local testing, this has shown
a 0.6 second reduction in the latency in calling IAM.

Issue #, if available:
n/a

Description of changes:
See above

Description of how you validated changes:
I tested the updated Policy loader in a python interpreter validating the pagination works as expected.

Checklist:

  • Write/update tests
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected

Examples?

Please reach out in the comments, if you want to add an example. Examples will be
added to sam init through https://github.com/awslabs/aws-sam-cli-app-templates/

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

SAM runs within a Lambda function and loads IAM Managed Policies once per
Lambda. Previous to this, SAM would call IAM 9 times which could cause
throttling by IAM. With this change, we update the MaxItems from the
default of 100 to the max (1000). In local testing, this has shown
a 0.6 second reduction in the latency in calling IAM.
@codecov-commenter
Copy link

codecov-commenter commented May 18, 2021

Codecov Report

Merging #2033 (57ee893) into develop (54e2a16) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2033      +/-   ##
===========================================
+ Coverage    93.58%   93.63%   +0.05%     
===========================================
  Files           90       90              
  Lines         6080     6081       +1     
  Branches      1247     1247              
===========================================
+ Hits          5690     5694       +4     
+ Misses         182      180       -2     
+ Partials       208      207       -1     
Impacted Files Coverage Δ
...translator/translator/managed_policy_translator.py 94.44% <100.00%> (+0.32%) ⬆️
samtranslator/translator/logical_id_generator.py 100.00% <0.00%> (+9.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54e2a16...57ee893. Read the comment docs.

@jfuss jfuss merged commit 7f67318 into aws:develop May 18, 2021
mgrandis pushed a commit to mgrandis/serverless-application-model that referenced this pull request Jun 23, 2021
SAM runs within a Lambda function and loads IAM Managed Policies once per
Lambda. Previous to this, SAM would call IAM 9 times which could cause
throttling by IAM. With this change, we update the MaxItems from the
default of 100 to the max (1000). In local testing, this has shown
a 0.6 second reduction in the latency in calling IAM.

Co-authored-by: Jacob Fuss <[email protected]>
mgrandis added a commit that referenced this pull request Jun 23, 2021
* Revert "fix: Crash when using an invalid method in open api (#2001)" (#2021)

This reverts commit d57b132.

* fix: Increase PageSize of ListPolicies Paginator (#2033)

SAM runs within a Lambda function and loads IAM Managed Policies once per
Lambda. Previous to this, SAM would call IAM 9 times which could cause
throttling by IAM. With this change, we update the MaxItems from the
default of 100 to the max (1000). In local testing, this has shown
a 0.6 second reduction in the latency in calling IAM.

Co-authored-by: Jacob Fuss <[email protected]>

* Revert "Issue 1508 remove check requiring identity ... (#1577)" (#2038)

This reverts commit 0eb3630.

This change caused regression, reverting until the bug is fixed.

bug: `ReauthorizeEvery` can be a `dict` when intrinsic functions are used.

* chore: bump version to 1.37.0 (#2068)

Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: _sam <[email protected]>
mgrandis added a commit that referenced this pull request Jul 6, 2021
* Release/v1.37.0 (#2069)
* chore: bump version to 1.37.0 (#2068)

* fix: Increase PageSize of ListPolicies Paginator (#2033)
Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Jacob Fuss <[email protected]>

* feat: Support VIRTUAL_HOST as Type for SourceAccessConfiguration for MQ events (#76) (#2078)
Co-authored-by: Renato Valenzuela <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants