This message was deleted.
s
This message was deleted.
b
I've had a lot of success using the lambda docker containers. Even if you don't end up using them to deploy, the code that you're running is still the same
d
sounds good, I don't want to really introduce sam
do you have any pointers to docs/examples?
b
We have a blog post on how to set up lambda with docker here: https://www.pulumi.com/blog/aws-lambda-container-support/ and an associated video here:

https://www.youtube.com/watch?v=4RC37yZJakM

I've got a really basic example of a container based lambda here: https://github.com/pierskarsenbarg/pulumi-scratchpad/tree/main/lambda-container and in that if you go into the
app
folder and then build and run the docker container, you can follow the instructions here: https://docs.aws.amazon.com/lambda/latest/dg/images-test.html#images-test-AWSbase to access the lambda function over HTTP (the
{}
in that test example is the json for your lambda event)
d
nice thanks!
I guess another option would be localstack but I've heard contrasting opinions on it
b
That's another option. Obviously it's not built by AWS so it's not going to be perfect. Give me a moment, I think someone wrote something about using localstack and pulumi recently. Let me see if I can find it
Here's quite a recent one: https://cabeaulac.medium.com/rapid-aws-api-dev-on-your-laptop-with-localstack-pulumi-postgresql-and-docker-9140569a0ffa We have had some people trying to use Pulumi and Localstack and because localstack isn't exactly like AWS it means that Pulumi returns errors, so just be aware of that
d
haha I just was on that post
b
There's another one from the end of last year: https://overflowed.dev/blog/how-to-deploy-localstack-with-pulumi/
f
I found this method to be a bit easier for dealing with Localstack: https://github.com/pulumi/examples/issues/185#issuecomment-789082921
d
looks nice thanks - I am also exploring the 'just container' avenue as the localstack seems quite a lot of setup
but now I am fighting with docker being painfully slow on mac (M1) with yarn
204 Views