Skip to content

michaelthegreat/rust-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This file provides the code for an aws lambda that performs a single rust postgresql query and returns the results in JSON

It can be used for reference for anyone who needs the same thing

to use yourself you can set up your env like .env.example with credentials and modify the query and return type

Uses cargo-lambda so first run aws configure.

test locally with

cargo lambda watch

deploy with

cargo lambda build

cargo lambda deploy --s3-bucket bucket-name

If it can be made more generic and serialize the json at the end in an automated way I think it would be more useful . Like, if it took any sql query as input and just figured out the types on its own I think it would have great power to help developers get a sql query out of a lambda quickly. Let me know if you know tips how to do this :)

cargo lambda build --release --target x86_64-unknown-linux-musl --output-format zip

About

A rust lambda that performs a postgresql query and returns the results in JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages