Title: Issue #49: Serverless Is More Than Code Publication: Ready, Set, Cloud! Series: Ready, Set, Cloud Picks of the Week Author: Allen Helton Published: March 06, 2023 URL: https://www.readysetcloud.io/newsletter/49/ We talk about serverless aspects outside of writing code in this issue. Testing, latency, and security are all highlighted. ### Serverless Superhero Our serverless superhero this week is [Gillian Armstrong](https://twitter.com/virtualgill), senior Solutions Architect at AWS and former Machine Learning Hero. She is a co-organizer of ServerlessDays Belfast, which was held last week (and was awesome). Gillian is a tremendous serverless advocate is routinely sharing her expertise on panels and conferences. Thank you for all your contributions to the community, Gillian! ### Tutorials .NET is on the rise with Lambda lately. It's a great language and I am happy to see it get some love (I spent the first 7 years of my career as a .NET developer). [Steve Roberts](https://twitter.com/bellevuesteve) showed us how to [boost your .NET functions with the Lambda Annotations Framework](https://dev.to/steveroberts/adopting-the-lambda-annotations-framework-4k8). He walks us through how to take your existing functions and migrate them over to the annotation framework to simplify your designs and make maintenance easier in the long run. As I always say, we don't talk about security enough. One topic within security is JWT management. We don't *ever* talk about that. [Benjamen Pyle](https://twitter.com/benjamenpyle) shared with us an interesting article on [customizing Cognito-issued JWTs](https://www.binaryheap.com/extending-and-customizing-the-jwt-from-cognito-via-aws-lambda-using-go/) where he talks about how he uses a Lambda function to enrich the encoded JWT information. He even offers sample CDK code to get you off and running with the concept. Great article! Leave it to the community to find and work around edge cases of new features. Apparently there's an issue when connecting an EventBridge pipe to a DynamoDB stream when a record contains an array. But fear not! [Jason Wadsworth](https://twitter.com/quizout) figured out [how to get around it](https://dev.to/aws-builders/solving-the-dynamodb-eventbridge-pipes-problem-9ca). Without spoiling the content, there's an easy workaround you can do in the pipe enrichment that gets you out of trouble. ### Interesting Reads I make it no secret that Step Functions is my favorite AWS service. Whenever I see an article that advocates for Step Functions and provides legitimate reasons why it's better than a Lambda function that does 8+ things, I always get excited. [Matt Morgan](https://twitter.com/NullishCoalesce) did just that last week. He describes how to [avoid the serverless workflow antipattern](https://dev.to/aws-builders/avoiding-the-serverless-workflow-antipattern-2ba1) in detail and covers why Step Functions is a better orchestrator than SQS -> Lambda. He also provides great resources to learn more about the service. [Ran Isenberg](https://twitter.com/IsenbergRan) is back, and this time tackling a beast of a topic: [Serverless testing](https://www.ranthebuilder.cloud/post/guide-to-serverless-lambda-testing-best-practices-part-1). This is part 1 of a series on best practices around testing a serverless application. He talks about application structure, where you should (and shouldn't) debug, mocking AWS services, and much more. This is a topic in desperate need of some normalization, and Ran's article is a great start. Serverless gets a bad rap in some circles because of cold starts. But a cold start isn't the only cause of latency in the cloud. I ([Allen Helton](https://twitter.com/allenheltondev)) wrote about how [geographic distance adds to your API latency](https://www.readysetcloud.io/blog/allen.helton/serverless-lessons-location-is-everything/). If your backend functions are calling 3rd party services in other regions, you could be paying for a lot of added execution time! In the article, I posed it as a serverless problem, but it applies to anything in the cloud. Keep this in mind next time you're building a new service! [Jeremy Daly](https://twitter.com/jeremy_daly) talked about [the side effect of increasing developer responsiblity](https://www.jeremydaly.com/the-side-effect-of-increasing-developer-responsibility/) in a post last week. He starts off with a history of software developer responsibilities and progresses into explaining a real problem we face nowadays. It's an open-ended article leaving you with thoughts on how we can approach cloud development (not just serverless) differently to make it sustainable for individuals long term. Without taking action, the new set of responsibilities is sure to increase stress levels and burnout rates. ### New Releases A swath of releases came out last week: You can [trigger a Lambda function from an Amazon DocumentDB change stream](https://aws.amazon.com/about-aws/whats-new/2023/02/aws-lambda-amazon-documentdb-change-streams-event-source/). This is similar to what you can do with DynamoDB, but for DocumentDB! The [AWS Lambda Powertools for .NET](https://aws.amazon.com/about-aws/whats-new/2023/02/aws-lambda-powertools-net-generally-available/) went GA! Similar to the Lambda Powertools for TypeScript, this package provides easy abstractions for structured logging, distributed tracing, and metrics. Rust developers rejoice! [AWS SAM CLI can now build Rust packages](https://aws.amazon.com/about-aws/whats-new/2023/02/aws-sam-cli-preview-rust-build-support/), making it significantly easier and less of a hassle to build your serverless applications in this blazing fast language. Amazon Neptune Serverless can now [scale down to 1 NCU](https://aws.amazon.com/about-aws/whats-new/2023/03/amazon-neptune-serverless-scales-down-1-ncu-costs/). While it's not scale to 0, it's a step in the right direction. ### Spotlight A new slew of AWS Community Builders were accepted into the program this week! It always warms my heart to see the excitement and vigor in every new cohort. Hundreds of new builders have been inducted, so be on the lookout for more great content from them, especially in the [Dev.to AWS Community Builders organization](https://dev.to/aws-builders). Congratulations community builders!! ### Tip of the Week I tend to shy away from polarizing topics for obvious reasons. But I saw a dramatic oversimplification and short-sighted opinion that reached a lot of people in the community and figured I'd weigh in. [David Hansson](https://twitter.com/dhh) has been pretty vocal about his distaste for serverless and the cloud for a while. But the tweet sharing his article on how serverless is too expensive is just silly. There is [so much more to cost than your cloud bill](https://www.readysetcloud.io/blog/allen.helton/understanding-tco-of-serverless-and-container-applications/). Basing significant technical decisions on "vendor lock-in" and a monthly cloud bill misses the point of serverless in its entirety. It's about shared responsibility, building without limits, and focus on solving business problems. Take what he says with a grain of salt. Don't be dismissive, but understand he's not capturing the whole story. ### Last Words Conference CFPs are opening up like crazy. Are you going to be speaking at any? Did you already speak at one and want to share? Let me know! If you'd like to make a recommendation for the serverless superhero or for an article you found especially useful, send me a message on [Twitter](https://twitter.com/allenheltondev), [LinkedIn](https://www.linkedin.com/in/allenheltondev/), or [email](mailto:allenheltondev@gmail.com). Happy Coding! Allen