AWS

What You Need To Know About SAM Templates

AWS SAM template is a thin abstraction of a CloudFormation template to develop and deploy lambda by a AWS tool, SAM (Serverless Application Model). It has shorter syntax compared to writing infrastructure as code with CloudFormation. We still do a little bit of learning when it comes to writing SAM …

Node.js

AWS Lamda Function TypeScript Boilerplate

I have created a boilerplate for TypeScript lambda function. If you are into JavaScript, I have the boilerplate here. TypeScript is really JavaScript that scales as the official tag line suggests. It is type-safe and the TypeScript specific intellisense provided by Visual Code Studio is amazing. Compared to writing in …

Node.js

AWS Lambda Function Node.js Boilerplate

AWS Lambda function allows you to run a piece of code in a serverless manner. All you need to do is to upload your function to the cloud. It sounds easy. The problem is that the function seldom runs on its own. Most of the time, it is only useful …

Front-End

Uploading File from Browser to S3 with JavaScript

Uploading a file from a browser to S3 for only authorised users is a pretty cool trick. It is even cooler if we can build it in a serverless way. Here is the entire solution for a simple serverless app to authenticate with AWS Cognito and upload a file to …

Front-End

Serverless Authentication with AWS Cognito and JavaScript

In a traditional web application, authentication is handled by server-side code and users are managed in the database layer. In the world of serverless apps, we can offload the heavy-lifting to a managed authentication service like AWS Cognito to simplify it. This post focuses on JavaScript code to authenticate users …

AWS

How to Solve ‘Missing Authentication Token Error’ with API Gateway Custom Domain

After setting up everything correctly, you may have ‘Missing Authentication Token Error’ when you call the custom domain while the endpoint from API gateway works. Surprisingly, this is one of the most common errors I have seen, yet not very well documented. So, here it is. When you encounter this …

Data Engineering

Event-Driven S3 Data Ingestion With Node.js Lambda Function and Deploy it with Serverless

Ingesting data upon the file creating on S3 bucket enables near real-time data ingestion. For example, you may need to ingest log files from applications or API monitoring tools as soon as they land on the bucket. Just to get it started, let’s move the file from the source bucket …

Infrastructure

Advanced AWS Lambda Python Function Deployment with Serverless

You can deploy lambda functions manually with hard-coded environment variables. But, that is not a good development practice. When we deploy the function to production, the deployment process eliminates the necessity of changing any input parameters or configuration. Serverless is a lambda function deployment tools that enable good development practice …

Infrastructure

How to Deploy Python Lambda Function with Serverless in AWS (Introduction)

To deploy a AWS lambda function written in Python, you need to package all the modules that are used in your code before pushing it to your environment. Serverless is a great lambda deployment framework. It takes care of all the packaging and deployment. With Python, the best approach to …

Infrastructure

Setting up Docker and Serverless Development Environment in Ubuntu

Docker and Serverless do not work well with Windows. I have tried so many different ways to make them work, to no avail. My solution is to use an Ubuntu virtual machine. I primarily use those frameworks for AWS lambda developments with both Python and Node.js. Here is how I …