docs: Add dependency management guidance - #67
Open
benrkia wants to merge 1 commit into
Open
Conversation
The managed runtime ships the AWS SDK and its transitive dependencies at specific versions. If a customer's Gemfile.lock pins a different version of an SDK transitive dependency (e.g. bigdecimal), they will encounter Gem::LoadError on function init. Closes #65
There was a problem hiding this comment.
Pull request overview
This PR adds documentation to help Ruby Lambda customers avoid Bundler Gem::LoadError issues caused by version mismatches between gems pre-activated in the managed runtime (via the preinstalled AWS SDK and default gems) and versions pinned in Gemfile.lock.
Changes:
- Added a new “Dependency Management” section describing how runtime-provided gem versions can conflict with a pinned lockfile.
- Provided mitigation steps (avoid incompatible pins, update the lockfile, or switch to a deployment model with full dependency control).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| To avoid this: | ||
|
|
||
| - **Do not add version constraints** on transitive dependencies of the SDK in your Gemfile. Refer to the [`aws-sdk-core` gemspec](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-core/aws-sdk-core.gemspec) for the current list. | ||
| - If you encounter a version conflict after a runtime update, **re-run `bundle install`** to update your lockfile to match the current runtime, then redeploy. |
|
|
||
| To avoid this: | ||
|
|
||
| - **Do not add version constraints** on transitive dependencies of the SDK in your Gemfile. Refer to the [`aws-sdk-core` gemspec](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-core/aws-sdk-core.gemspec) for the current list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Closes #65
Description of changes:
The managed runtime ships the AWS SDK and its transitive dependencies at specific versions. If a customer's Gemfile.lock pins a different version of an SDK transitive dependency (e.g. bigdecimal), they will encounter Gem::LoadError on function init.
Target (OCI, Managed Runtime, both):
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.