Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In addition to local dynamo, they also have local AWS Lambda execution via AWS SAM (Serverless Application Model).

You invoke it via the command line

`sam local invoke [OPTIONS] [FUNCTION_LOGICAL_ID]`

Behind the scenes it is running an attached docker container and feeding you the output. I found that it works actually very well and mimics the cloud invocation environment perfectly.

The problem is that it stubs out any other services you run. So if your Lambda adds something to SQS or SNS or SES or S3 or anything else, it simply stubs those out. So advanced functions do get difficult to test locally. But This Localstack emulator may solve those problems (but I haven't used it yet)

Details: https://docs.aws.amazon.com/serverless-application-model/lat...



I’ve used localstack to mock things like Dynamo, S3 and Step Functions for dev/integration testing of lambdas built with SAM with great results. I actually didn’t know that SAM stubbed those out by default and haven’t used it for a while, but I found that if you point your AWS library at localstack:4566 then it’ll run it all against localstack correctly.


They also support local stepfunctions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: