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

Alternative option to RDS Library for IAM to avoid Lambda Size Limits. #788

Closed
1 of 2 tasks
rorychatterton opened this issue Dec 15, 2023 · 3 comments
Closed
1 of 2 tasks
Assignees
Labels
enhancement New feature or request

Comments

@rorychatterton
Copy link

rorychatterton commented Dec 15, 2023

Describe the feature

I would appreciate a smaller alternative to the RDS library to enable IAM Authentication, as the RDS library is extensive and provides many features that are not required for IAM RDS Auth to function.

Use Case

The RDS dependency is an extensive library (22 MB uncompressed, 4 MB compressed), which causes issues when running on Lambda, which only allows for ~270 MB uncompressed across all layers.

Having an alternative option that only provides the IAM Auth token flow should significantly reduce the required footprint when running on Lambda with JDBC.

Proposed Solution

I think the solution would be:

  • An alternative library dependency option that only provides the necessary APIs to enable API Authentication or
  • Integrating the IAM Token Fetch/Refresh workflow into the existing JDBC-wrapper

The dependencies on the rds library seem pretty light and can be found here:
https://github.com/search?q=repo%3Aawslabs%2Faws-advanced-jdbc-wrapper+software.amazon.awssdk.services.rds&type=code

Other Information

Some context:
Considering the speedup that comes with Snapstart, we've been looking at using Native Java over Graalvm to increase our DevEx in the lower dev environments. This has meant that the size of the lambdas have significantly increased because we lose the benefit of GraalVM Tree shaking.

We're hitting the lambda limits using little more than Micronaut + Aurora Wrapper + Hibernate + Open Telemetry Collector + RDS. The RDS library is the second largest jar in our manifest behind Hibernate.

While Snapstart isn't "new" new, I suspect we'll see more issues like this as people experiment with it over Graal while using fuller frameworks like Micronaut/Spring/etc.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

The AWS Advanced JDBC Driver version used

2.2.5

JDK version used

17.0.8

Operating System and version

N/A

@sergiyvamz
Copy link
Contributor

Hi @rorychatterton

We've merged PR and the fix is now available in the latest snapshot build. We hope that the latest improvements help to solve your issue.

@rorychatterton
Copy link
Author

Thankyou @sergiyvamz!

I'll test this in the next couple of days and let you know how I go.

@aaronchung-bitquill
Copy link
Contributor

Hi @rorychatterton

I know this ticket is closed, but I wanted to let you know that the fix is now available on the latest version of the driver.

Thank you!

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

No branches or pull requests

3 participants