AWS re:Invent is in full swing, with AWS announcing a slew of new features. Most notably, we’re pretty excited about AWS Lambda’s support for Layers.
Layers allows you to include additional files or data for your functions. This could be binaries such as FFmpeg or ImageMagick, or it could be difficult-to-package dependencies, such as NumPy for Python. These layers are added to your function’s zip file when published. In a way, they are comparable to EC2 AMIs, but for functions.
The killer feature of Lambda’s Layers is that they can be shared between Lambda functions, accounts, and even publicly!
There are two aspects to using Lambda Layers:
- Publishing a layer that can be used by other functions
- Using a layer in your function when you publish a new function version.
We’re excited to say that the Serverless Framework has day 1 support for both publishing and using Lambda Layers with your functions with Version 1.34.0!
See how you can publish and use Lambda Layers with the Serverless Framework below…
It’s been a while since we last published a status update about React Native.
At Facebook, we’re using React Native more than ever and for many important projects. One of our most popular products is Marketplace, one of the top-level tabs in our app which is used by 800 million people each month. Since its creation in 2015, all of Marketplace has been built with React Native, including over a hundred full-screen views throughout different parts of the app.
You might have already heard about our new project, Serverless Components. Our goal was to encapsulate common functionality into so-called “components”, which could then be easily re-used, extended and shared with other developers and other serverless applications.
In this post, I’m going to show you how to compose a fully-fledged, REST API-powered application, all by using several pre-built components from the component registry.
Using Amazon DynamoDB Accelerator (DAX) from AWS Lambda has several benefits for serverless applications that also use Amazon DynamoDB. DAX can improve the response time of your application by dramatically reducing read latency, as compared to using DynamoDB. Using DAX can also lower the cost of DynamoDB by reducing the amount of provisioned read throughput needed for read-heavy applications. For serverless applications, DAX provides an additional benefit: Lower latency results in shorter Lambda execution times, which means lower costs.
Connecting to a DAX cluster from Lambda functions requires some special configuration. In this post, I show an example URL-shortening application based on the AWS Serverless Application Model (AWS SAM). The application uses Amazon API Gateway, Lambda, DynamoDB, DAX, and AWS CloudFormation to demonstrate how to access DAX from Lambda.
async/await freed us from callback hell, but people have started abusing it — leading to the birth of async/await hell.
In this article, I will try to explain what async/await hell is, and I’ll also share some tips to escape it.
What is async/await hell