This message was deleted.
# getting-started
s
This message was deleted.
g
Runtime is just a string, so as long as you supply valid runtime value then yes, see https://www.pulumi.com/docs/reference/pkg/aws/lambda/function/#inputs for more info
b
after, i supply valid runtime(eg. provide), how to upload the rust executable file (usually called bootstrap)
g
Are you new to Infrastructure as Code as well?
I'd recommend reading pulumi examples
b
i very familiar with aws sam, i have a project that use sam to manage aws lambda functions and related resources, but use rust as well, i want translate the project to pulumi ,i have read the pulumi examples, i just don't know how to handle this scenario🤣
g
SAM abstracts quite a bit from you, I reckon it creates a lambda and loads the Rust binary from S3. So to use it with pulumi you'll need to upload the binary to S3 (pulumi resource S3 object) and then attach this to the lambda
🙌 1
m
hey @bland-smartphone-19451 I've spent the last couple days doing exactly this. Here's a gist with my code: https://gist.github.com/newhouseb/1944cf4bdeeb5bc799bc327fc8a25f59 Couple notes: • You need to specify a handler even though it's not used, because somewhere in Pulumi it'll otherwise try to use a handler of "" which AWS does not like. • You might already be familiar but awsx's apigateway functions use API Gateway V1. Rust packages like lambda_web require V2, so I had to manually set up everything with aws.apigatewayv2
(and also assuming you already know all the things about musl & libc if you've deployed rust in a Lambda elsewhere)
b
thank you
g
what's the advantage of using Rust in lambda?
m
Well, I like the type-safety and overall correctness that Rust enforces and I like AWS Lambda because I don't like to manage servers and most of my services are small enough scale that even a single dedicated VM would be overkill
👍 1
134 Views