Recently AWS announced S3 Object Lambda, which enables data processing as it is being retrieved from S3. By using S3 Object Lambda, you can easily present multiple views from the same dataset, and you can update the Lambda functions to modify these views at any time.
For example, we have a user dataset stored in S3, the dataset has user email, name, and address. When the data is requested by an email marketing application via an S3 Access point, we don’t want to expose the address data, whereas when requested by a post marketing application we don’t want to expose…
AWS SQS plays a significant role in modern application architecture, especially in a serverless environment. When working with SQS, it is often to see messages failed to be consumed, it could be a bug in your code, a temporary resource restriction, eg API rate exceeded, or dependencies in the messages to be processed. In most scenarios, you would want to know what the messages are after they fail many times, then you can find out why and fix the problems. This is where the SQS dead-letter queue comes into play.
However, monitoring the Dead-letter can be a challenge, one of…
In Jun 2020, AWS announced that RDS Proxy is generally available for both MySQL and PostgreSQL engine compatibility. It is a significant milestone for AWS serverless ecosystem because for many serverless architectures, making DB serverless is not an easy task, now with RDS Proxy, the task is no longer as challenging as before.
I assume anyone who is reading this post is a serverless pioneer and knows the pros and cons of RDS Proxy, so I am not going to write a list of goodies, instead, I will dive into the code and show you how to work with it.
It is a common use case to secure your S3 assets behind CloudFront, so that the assets can only be accessed via CloudFront. Normally it can be done by adding OAI to the CloudFront distribution, and use CloudFront signed URL to access the assets. Lambda@Edge provides new thinking to achieve the same goal with flexibility.
As the name suggests, Lambda@Edge runs the lambda function at the CloudFront edge location, hence it’s closer to the user and faster to run. The most powerful weapon is that you can programmatically control how you want the SF distribution and S3 to be accessed!
There are numerous hosting providers that allow you to host your website on their server and enable you to manage your website files using SFTP. If you happen to have an AWS account and enjoy DIY, you can easily setup S3 website + SFTP within a few minutes.
Create an S3 bucket, the bucket name must be exactly the same as your domain, in my scenario, I have mianio.com hosted zone managed by Route53, so the bucket name must be something.mianio.com. You will need to untick
Block all public access because your website needs to be pubic accessible.
I’ve written quite a few How-To-Create-PDF-using-X-on-Serverless-AWS-Lambda posts, covered wkhtmltopdf, Chromium Puppeteer and Pdf-Kit, and I’ve been getting some requests asking to write articles on other libraries. Pdf-lib is one of them.
To be honest, I wasn’t aware of PDF-LIB before, it’s a fairly new solution comparing with the others, but the trending is quite promising, code is easy to understand, API documentation is comprehensive, and more importantly, the maintainer is obviously very active in terms of bug fixing and new features, so I decided to give it a go!
Pdfkit is a popular tool for manipulating PDF, and running it on AWS Lambda makes it even more powerful because of the benefits from being serverless, but it can be a bit tricky to set up from the ground.
As always I use Serverless framework to manage the AWS resources, and I use serverless-offline to simulate local dev environment. The AWS Lambda runtime is nodejs12.x, and the code is written in TypeScript.
*binaryMediaTypes. It will add application/pdf as Binary Media Types in API Gateway settings.
This is very important because we don’t want API Gateway to convert the response…
AWS announced the improvement on VPC networking for Lambda in September, since then I’ve been checking the updates every day, it finally arrives Sydney region!
Cold start issue has been the №1 blocker for many companies that are going Serverless, at Inquisitive we paused the steps going full Serverless, we knew AWS would do something, and here it is! After benchmarking we have seen significant improvement in lambda function starting time!
Go and check out the original post from AWS to have a better understanding of the cold start issue, but basically the improvement is, instead of creating one ENI…
AWS is pretty generous on giving credits to startups, to help them cover the AWS bills in their early days (well you know so that they can grow deeply within AWS platform, and eventually AWS will get you to pay the bill with real money). This program is called AWS Activate, you can find a lot to read on https://aws.amazon.com/activate/, but there is something AWS are not telling you.
I stir fry JS, steam AWS and code Beijing duck