Skip to content

What is the idiomatic way to rewrite some standard JS lambda code in Rust? #823

Answered by calavera
sn99 asked this question in Q&A
Discussion options

You must be logged in to vote

I've made some improvements on how you can get the authorizer in the main branch. The changes are not in any release yet, but you can point your dependencies to the GitHub repository if you want to use them.

Your code is sound, but it's probably too complicated to maintain. Take a look at the examples in https://github.com/awslabs/aws-lambda-rust-runtime/blob/main/examples/http-axum-apigw-authorizer/src/main.rs

Do I need to specify isBase64Encoded or is it automatically handled, both for reading and writing?

it's only handled for writing.

You don't need to implement IntoResponse unless you want a very specific response object. You can also return a http::Response directly. Something lik…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@sn99
Comment options

@calavera
Comment options

Answer selected by sn99
@calavera
Comment options

@sn99
Comment options

@calavera
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants