-
Notifications
You must be signed in to change notification settings - Fork 615
feat: support default role assumers #2179
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
feat: support default role assumers #2179
Conversation
5fc28df
to
0dc6a94
Compare
0dc6a94
to
e9b7c02
Compare
Codecov Report
@@ Coverage Diff @@
## main #2179 +/- ##
=======================================
Coverage ? 78.92%
=======================================
Files ? 382
Lines ? 16206
Branches ? 3515
=======================================
Hits ? 12791
Misses ? 3415
Partials ? 0 Continue to review full report at Codecov.
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This PR is replaced by #2221. Closing. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue
Resolves #2087
Resolves #1998
Resolves #2011
Resolves #1193
Description
This change provides default role assumer for the default credentials provider that calls
sts:assumeRole
orsts:assumeRoleWithWebIdentity
under the hood. As a result, users don't need to import STS client and supply their own role assumer(like mentioned in #1193).These assumer is exported from STS client not the
packages/
folder because it can avoid circular dependency. Thecredential-provider-*
packages having any dependency over STS client will cause the same issue. As a result this change makes the source code comply the contract thatclients/
depends onpackages/
;lib/
depends onpackages/
andclients/
.Testing
✅ It has been manually tested with credential files containing assume role chaining
✅ It has been validate with bundler(Webpack) that tree shaking work well
Additional context
The example Lambda function size after tree shaking using default configure shows an increase from 115KB to 190KB because the base client now has dependencies over STS client
This change will add some overhead to lambda cold start performance whereas warm start performance is not changed. Here's a typical load test result(10K request, 500 concurrency). The lattency increases about 1~5%
Lambda invoke with 1 DyanmoDB call. Webpack; v3.9.0
Lambda invoke with 1 DyanmoDB call. Webpack; local-released
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.