Step-by-Step Guide to Building a Serverless Text to Speech Solution using Golang on AWS

The field of machine learning has advanced considerably in recent years, enabling us to tackle complex problems with greater ease and accuracy. However, the process of building and training machine learning models can be a daunting task, requiring significant investments of time, resources, and expertise. This can pose a challenge for many individuals and organisations looking to leverage machine learning to drive innovation and growth.

That’s where pre-trained AI Services come in and allow users to leverage the power of machine learning without having extensive machine learning expertise and needing to build models from scratch - thereby making it more accessible for a wider audience. AWS machine learning services provide ready-made intelligence for your applications and workflows and easily integrate with your applications. And, if you add Serverless to the mix, well, that’s just icing on the cake, because now you can build scalable and cost-effective solutions without having to worry about the backend infrastructure.

[Read More]

Use Golang for data processing with Amazon Kinesis and AWS Lambda

This blog post is for folks interested in learning how to use Golang and AWS Lambda to build a serverless solution. You will be using the aws-lambda-go library along with the AWS Go SDK v2 for an application that will process records from an Amazon Kinesis data stream and store them in a DynamoDB table. But that’s not all! You will also use Go bindings for AWS CDK to implement “Infrastructure-as-code” for the entire solution and deploy it with the AWS CDK CLI.

[Read More]

Getting started with MSK Serverless and AWS Lambda using Go

In this blog post you will learn how to deploy a Go Lambda function and trigger it in response to events sent to a topic in a MSK Serverless cluster.

The following topics have been covered:

  • How to use the franz-go Go Kafka client to connect to MSK Serverless using IAM authentication.
  • Write a Go Lambda function to process data in MSK topic.
  • Create the infrastructure - VPC, subnets, MSK cluster, Cloud9 etc.
  • Configure Lambda and Cloud9 to access MSK using IAM roles and fine-grained permissions.

Prerequisites

You will need an AWS account, install AWS CLI as well a recent version of Go (1.18 or above).

[Read More]

Getting started with MSK Serverless and AWS Lambda using Go

In this blog post you will learn how to deploy a Go Lambda function and trigger it in response to events sent to a topic in a MSK Serverless cluster.

The following topics have been covered:

  • How to use the franz-go Go Kafka client to connect to MSK Serverless using IAM authentication.
  • Write a Go Lambda function to process data in MSK topic.
  • Create the infrastructure - VPC, subnets, MSK cluster, Cloud9 etc.
  • Configure Lambda and Cloud9 to access MSK using IAM roles and fine-grained permissions.

Prerequisites

You will need an AWS account, install AWS CLI as well a recent version of Go (1.18 or above).

[Read More]

Build a Serverless URL shortener with Go

Using AWS Lambda, DynamoDB and API Gateway

This blog post covers how to build a Serverless URL shortener application using Go. It leverages AWS Lambda for business logic, DynamoDB for persistence and API Gateway to provide the HTTP endpoints to access and use the application. The sample application presented in this blog is a trimmed down version of bit.ly or other solutions you may have used or encountered.

It’s structured as follows:

  • I will start off with a quick introduction and dive into how to deploy try the solution.
  • After that, I will focus on the code itself. This will cover:
    • The part which is used to write the infrastructure (using Go bindings for AWS CDK)
    • And also the core business logic which contains the Lambda function (using Lambda Go support) as well as the DynamoDB operations (using the DynamoDB Go SDK)

In this blog, you will learn:

[Read More]

Learn how to use DynamoDB Streams with AWS Lambda and Go

Replicate DynamoDB data from one table to another

This blog post will help you get quickly started with DynamoDB Streams and AWS Lambda using Go. It will cover how to deploy the entire solution using AWS CDK.

The use case presented here is pretty simple. There are a couple of DynamoDB tables and the goal is to capture the data in one of those tables (also referred to as the source table) and replicate them to another table (also referred to as the target table) so that it can serve different queries. To demonstrate an end-to-end flow, there is also an Amazon API Gateway that front ends a Lambda function which persists data in the source DynamoDB table. Changes in this table will trigger another Lambda function (thanks to DynamoDB Streams) which will finally replicate the data into the target table.

[Read More]

Build a Twitter Leaderboard app with Redis and AWS Lambda (part 2)

This is the second blog post of this two-part series that uses a practical application to demonstrate how to integrate Redis with AWS Lambda. The first part was about the solution overview, deployment and hopefully you were able to try it out end to end. As promised, the second part (this one) will cover the Infrastructure aspects (IaaC to be specific) which is comprised of three (CDK) Stacks (in the context of a single CDK App).

[Read More]

Build a Twitter Leaderboard app with Redis and AWS Lambda (part 1)

Hello and welcome 👋🏼 to this two-part blog series that uses a practical application to demonstrate how to integrate Redis with AWS Lambda. The first part (this one) covers the application - by the end of this blog, you should have the solution deployed, played around with it and in the process, have a good overview of the solution.

The second part is about the Infrastructure (IaaC to be specific) aspects - its mostly centred around AWS CDK along with some code walkthrough.

[Read More]

Use Lambda Function URL to write a Serverless app backed by DynamoDB

This is a Go Lambda function that’s packaged and deployed using AWS SAM

Lambda Function URL is a relatively new feature (at the time of writing this blog) that provides dedicated HTTP(S) endpoint for your Lambda function. It is really useful when all you need is a single endpoint for your function (e.g. to serve as a webhook) and don’t want to setup and configure an API Gateway. Looks like I can’t seem to get enough of it! I have written a couple of blog posts on this topic that include a practical example of using it to build a serverless backend and then deploying that solution using AWS CDK.

[Read More]

Package and deploy a Lambda function as a Docker container with AWS CDK

Deploy a Serverless backend for Slack using Infrastructure-as-code (IaaC)

One of my previous blog post covered how to build a Serverless backend for Slack using by using Lambda Function URL as a webhook. Since I wanted to focus on the application itself, the infrastructure setup part was simplified - using AWS CLI, the function was packaged as a zip file, configured and finally a Function URL was created along with the required permissions.

[Read More]