Why I minimize emulator use when developing #serverless applications. A thread.
Early on in my serverless career I was one of the the many who attempted to emulate as much of the cloud as possible on my machine. 1/8
I used LocalStack, LambCI, Serverless Plugins, SAM local, Local DynamoDB, and others. The problem I found was two-fold. The first was that the emulators, even the AWS ones, were a shadow of the actual service they were emulating. 2/8
Especially with third-party emulators, there was no way to ensure they were processing data the same as the actual services. I would find myself struggling to fix a bug that was introduced, not by my code, but by the emulator. 3/8
The second issue I had with emulators was trying to get them to work together. I spent MANY days trying to get SAM local to see resources on LocalStack. Or connecting SAM local to Local DynamoDB. Honestly, my "docker network" foo was not (and still is not) up to the task. 4/8
So I came to a decision. I decided to bring the developer to the cloud instead of bringing the cloud to the developer. Yeah yeah, cliche, I know, but stay with me. I use emulators sparingly and I tend to stick with the AWS built ones. 5/8
I do NOT try connecting them together as that is already done in the cloud. When testing serverless I use SAM local for unit or function tests. Past that, I get my code to the cloud as fast as possible. 6/8
Finally, this is the driver behind SAM Accelerate (s12d.com/accelerate). We want to help devs get their code to the cloud early, often, and with as little latency as possible. In the next week or so, SAM Accelerate will be released as beta. Watch for my upcoming blog! 8/8
• • •
Missing some Tweet in this thread? You can try to
force a refresh
SVS208 (Breakout) - Building real-world #serverless applications with AWS SAM and Capital One. @georgemao and I talk about AWS SAM in the real world and the new SAM Accelerate features!
SVS305R1/R2 (Chaltalk) - CI & CD workflows for serverless applications. In this session I cover best practices for CI/CD for #serverless. Including utilizing new tools like SAM Pipelines!
SVS315 (Chalktalk) - Amazon S3 to AWS Lambda: A flexible pattern for serverless applications. In this session we talk about basic and more advanced patterns for utilizing the #serverless S3 -> Lambda pattern (and more)