5

AWS Lambda has support for Ruby 2.5, and it's straightforward to run a simple Ruby script in this environment

However, suppose your script requires some gems, how do you install and use gems in AWS Lambda?

1 Answer 1

4

Install the gems into the project folder by using the --path flag when running bundle install. Then include the installed dependencies in your .zip.source bundle. There are docs on creating a Ruby bundle.

Another option would be to create a lambda layer, which can make your deploys faster (smaller zip file) and be used to organize your code.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.