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

feat(aws-lambda) separate aws credential cache in aws-lambda plugin by plugin identifier in config #8907

Merged
merged 2 commits into from
Jun 9, 2022

Conversation

windmgc
Copy link
Member

@windmgc windmgc commented Jun 6, 2022

Summary

This PR is trying to separate AWS credential cache keys which are used by different aws-lambda plugins, by adding a plugin identifier in the mlcache key name.

Users might want to enable multiple aws-lambda plugins, targeting at different IAM roles and different lambda functions. Under this situation credential cache must be separated to avoid mutual overwrite

Full changelog

  • Adding conf.aws_assume_role_arn as plugin identifier to the credential cache key name

Issue reference

No issue reference for now.

@windmgc windmgc requested a review from a team as a code owner June 6, 2022 14:16
@windmgc
Copy link
Member Author

windmgc commented Jun 6, 2022

I wonder if there is a more proper/elegant way of adding plugin identifiers into the cache key instead of just using config.__key__.(it seems quite long, and the variable name have underscores which make it seems more like an internal variable)
I'd be grateful if anyone have good ideas on that

@windmgc
Copy link
Member Author

windmgc commented Jun 7, 2022

Decide to use the target IAM role ARN as the cache key identifier because the credential will only change when the target role changes. Using conf.__key__ will make cache keys way more distributed(per service/route/consumer).

@windmgc windmgc added this to the 3.0 milestone Jun 9, 2022
@fffonion fffonion merged commit f6dbea4 into Kong:master Jun 9, 2022
@windmgc windmgc deleted the feat-separate-aws-lambda-cred-cache branch June 9, 2022 13:49
locao pushed a commit that referenced this pull request Jun 21, 2024
Co-authored-by: Hayk Sardaryan <hayk.sardaryan@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants