π This is not properly displayed? Read all of our issues online! π‘
Hi Reader ππ½
Let's start with the obvious: We love AWS Lambda! πβ
β
And we're pretty sure you too, regardless of whether you're a long-term AWS Fundamentals subscriber or just recently joined. π
That's why we want to dedicate this newsletter to the fastest IaC to launch Serverless applications on AWS: The Serverless Framework
Citing DataDog's The State of Serverless:
Even more:
Let's get going! πΎ
Creating the necessary infrastructure for a simple service powered by Lambda and exposed to the internet via API Gateway can be a complex task.
While it is possible to manually configure everything in the AWS console, this approach is not recommended for serious projects due to its lack of reproducibility and potential for errors.
Serverless Framework simplifies this tremendously. It abstracts away much of the boilerplate configuration needed for Lambda, API Gateway, and other native integrations with AWS services like SQS or EventBridge.
In addition, Serverless Framework handles the packaging of your code and offers a powerful CLI that allows you to easily deploy Lambda functions.
β
When running sls , you will be prompted to choose a starter template, so you can get things going very quickly.
But that's not all offered by Serverless Framework.
There's also a searchable set of Real-world (π) serverless architecture examples. ποΈ
β
Serverless Framework provides a wide range of tools and features that not only simplify the process of setting up intricate infrastructure configurations but also incorporate industry best practices seamlessly.
Let's explore its concepts. π
β
In the Serverless Framework, a service is a fundamental unit of organization that is defined by the serverless.yml configuration file (or serverless.ts if you want to use TypeScript!).
This configuration file is then transformed into a CloudFormation template, which is used to create the necessary resources.
To create a new service configuration, you can simply run the sls command without any parameters. ποΈ
β
Functions serve as the compute layer in your serverless architecture, running on AWS Lambda.
They operate independently in terms of execution and deployment. While they typically serve a single purpose (small, dedicated functions), they are not limited to it and can perform multiple tasks if needed (fat functions).
Serverless Framework also offers easy configuration for:
β¦ and much more.
β
In the previous instance, we discussed an externally packaged deployment unit as an example.
However, Serverless also offers the capability to package your function's code internally.
Rather than relying on an artifact, you can utilize patterns to specify the files that should be included in your deployment unit ZIP file.
β
Serverless simplifies the process of creating triggers for your functions through events such as HTTP calls or messages.
It automatically creates the required infrastructure to seamlessly connect these events to your functions. π€
π‘ Example: An HTTP event is received through the Gateway, specifically for the /api/* path.
β
Serverless is an incredibly robust tool that comes equipped with a wide range of built-in features.
However, there's even more potential via the community plugins available! π₯
Naming just a few prominent ones:
serverless-plugin-resource-tagging) - easily add default tags for all of your templateβs resources.serverless-domain-manager) - add custom domain names for your API Gateways without any effort.serverless-plugin-ifelse) - create resources based on conditions, e.g. if you donβt want to have certain resources only in specific regions or stages.serverless-plugin-aws-alerts) - create CloudWatch alerts in just a few lines of code.serverless-step-functions) - create Step Functions event workflows.The plugin ecosystem is vast, offering a wide range of plugins to cater to almost any use case.
In this brief overview, we have only scratched the surface of the Serverless Framework and its capabilities. There is so much more to explore and learn about this powerful tool.
For a more comprehensive understanding, we recommend diving into our dedicated section on the Serverless Framework in our AWS Fundamentals book. π
So, if you're hungry for more information and eager to expand your understanding, be sure to check it out! As a newsletter subscriber, you're always in for a 15% discount on all of our products π
β
We wanted to give a shoutout to Alex DeBrie, an AWS Hero with a knack for DynamoDB, serverless applications, and cloud-native technologies. Whether you're a newbie or a seasoned AWS user, Alex's expertise can help you and your team make the most of AWS.
One thing that sets Alex apart is his ability to explain complex concepts in a simple and approachable way. He's also a fantastic writer, with articles like How you should think about DynamoDB costs and Event-Driven Architectures vs. Event-Based Compute in Serverless Applications showcasing his deep understanding of AWS services and his practical solutions to common challenges.
If you are looking to work with DynamoDB in the future, we highly recommend buying and reading βThe DynamoDB Bookβ. This comprehensive resource provides valuable insights and guidance on effectively utilizing DynamoDB. It covers various topics, including best practices, advanced techniques, and practical examples, making it the perfect reference.
Whether you are a beginner or an experienced developer, it will greatly enhance your understanding and proficiency in working with DynamoDB.
β
We'll also finish this issue with Alex by passing you one of his articles about Serverless Framework vs. AWS CDK.
β
Wishing you a great week & happy learning! π
Sandro & Tobi π
Still hungry for AWS content? Have a look at our blog! π β
We teach AWS for the real world - not for certifications. Join more than 10,500 developers learning how to build real-world applications on AWS.
AWS FOR THE REAL WORLD β±οΈ Reading time: 6 minutes π― Main Learning: Learn how to securely connect GitHub Actions to your AWS account using OIDC authentication without storing access keys. Step-by-step guide with IAM role setup, trust policy configuration, and workflow examples for safe CI/CD deployments. π Blog Post Hey Reader ππ½, welcome to another week of AWS for the Real World We are right in the middle of pre:invent. Re:Invent starts next week! We are both not present, but we will give you...
AWS FOR THE REAL WORLD β±οΈ Reading time: 4 minutes π― Main Learning: AWS CloudWatch log centralization makes cross-account logging simple. Learn how to set it up, avoid gotchas, and query logs across your organization. π Blog Post Hey Reader ππ½ another week, another newsletter about CloudWatch. This time we're talking about a rather new feature: Log Centralization. But quick question before we dive into this weekβs CloudWatch deep diveβ¦ Weβre 6 weeks out from 2025 (wild, right?) and Iβm...
AWS FOR THE REAL WORLD β±οΈ Reading time: 20 minutes π― Main Learning: How to achieve end-to-end observability by integrating CloudWatch Application Signals with OpenTelemetry for automatic service discovery and cross-service request tracing in AWS. π Blog Post π» GitHub Repository Hey Reader ππ½ Welcome to this weekβs AWS Fundamentals Newsletter. Pre:Invent season is starting slowly with new launches like: Bigger payload sizes for Kinesis and async Lambda invocations CloudWatchβs interactive...