Git Product home page Git Product logo

Comments (9)

oorestisime avatar oorestisime commented on May 29, 2024

Hitting that as well with libpq. @jlricon would be nice if you could share how you bypassed this issue.

from serverless-rust.

jlricon avatar jlricon commented on May 29, 2024

I use the musl builder and manually package the lambda and upload it. It'd be nicer to just change the dockerfile of this project to use musl and static libs

from serverless-rust.

oorestisime avatar oorestisime commented on May 29, 2024

hah, but how do you deploy this to AWS lambda then?

from serverless-rust.

jlricon avatar jlricon commented on May 29, 2024

From the command line using aws-cli

from serverless-rust.

oorestisime avatar oorestisime commented on May 29, 2024

Ah ok i thought there was a way to pick your own docker image here this is why i was asking. makes sense. thanks!

from serverless-rust.

softprops avatar softprops commented on May 29, 2024

possible to use serverless-rust if one has a dependency on a library that is not present in the build docker environment

You might want to take a look at https://github.com/softprops/lambda-rust#-using-hooks This was recently contributed by an external engineer. The engineer wanted a hook for installing extra application specific dependencies.

Making the image configurable should also be doable but the image itself does more than provide host dependencies, it provides the core workflow for building and packaging rust lambdas. I'd like the native lambda builder to stay the default.

From the command line using aws-cli

This is a bit out of scope of this project but I want to make clear that the goal if this repo is to make transparent and plain the existing serverless framework workflow. There are how ever many ways to deploy a lambda. This serverless framework plugin is but one.

from serverless-rust.

oorestisime avatar oorestisime commented on May 29, 2024

So i added the install hook there and it gets picked up but the libpq still not found at runtime. do i need to package libpq.so as well?

from serverless-rust.

oorestisime avatar oorestisime commented on May 29, 2024

Ok letting this here for anyone who might need it:
Install hook:

  
#!/usr/bin/env bash

echo "install hook called"
yum install -y postgresql-devel

Package hook

#!/usr/bin/env bash

echo "package hook called"
zip -j "$1.zip" /usr/lib64/libpq.so.5

from serverless-rust.

jlricon avatar jlricon commented on May 29, 2024

I'm closing the issue as it has been addressed and/or flagged as out of scope.

from serverless-rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.