How to Use AWS DynamoDB with Go: A Practical Guide with Localstack

golang docker aws dynamodb localstack

Introduction AWS DynamoDB is a highly scalable, fast, and flexible NoSQL database that is a great choice for applications that require low latency and high throughput. In this tutorial, we will show you how to use AWS DynamoDB with Go and localstack to test our code. This guide will provide you with practical examples and explanations that will make it easy for you to use DynamoDB in your Go applications.

Guide to Building AWS Lambda Functions with Go and Docker

golang docker aws lambda

Introduction AWS Lambda is a powerful serverless computing platform that allows developers to run their code without worrying about the underlying infrastructure. In this tutorial, we will explore how to build and deploy AWS Lambda functions using Go and Docker. We will start by creating a new Lambda function in the AWS Management Console, then write some Go code to implement our function. We will then use Docker to build a container image of our code and deploy it to AWS.

Receive Messages from AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to receive messages from a queue in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/receive-messages-from-aws-sqs-using-go

Send Messages to AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to send messages to a queue in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/send-messages-to-aws-sqs-using-go

Delete Queues in AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to delete queues in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/delete-queues-in-aws-sqs-using-go

List Queues in AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to list queues in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/list-queues-in-aws-sqs-using-go

Create Queues in AWS SQS using Go

development golang aws sqs

In order to work with AWS SQS using Go, we will use github.com/aws/aws-sdk-go-v2. In this gist, we will use the aws-sdk-go-v2 package to create queues in AWS SQS. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/create-queues-in-aws-sqs-using-go

Delete Files From AWS S3 using Go

development golang aws

In order to work with AWS S3 using Go, we will use github.com/aws/aws-sdk-go/aws. In this gist, we will use the aws-sdk-go package to delete all files under a given directory in a given bucket. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/delete-files-in-aws-s3-using-go

In order to test the snippet, we will use localstack to run s3 emulator in a docker container on the laptop. The container exposes s3 endpoint on port 4566. The snippet will then create a new bucket work-with-s3 in s3. The snippet will then delete all files from blog directory under work-with-s3 bucket.

Listing Files in AWS S3 using Go

development golang aws

In order to work with AWS S3 using Go, we will use github.com/aws/aws-sdk-go/aws. In this gist, we will use the aws-sdk-go package to list files under a given directory in a given bucket. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/listing-files-in-aws-s3-using-go

In order to test the snippet, we will use localstack to run s3 emulator in a docker container on the laptop. The container exposes s3 endpoint on port 4566. The snippet will then create a new bucket work-with-s3 in s3. The snippet will then list all files in blog directory under work-with-s3 bucket.

Uploading Files to AWS S3 using Go

development golang aws

In order to work with AWS S3 using Go, we will use github.com/aws/aws-sdk-go/aws. In this gist, we will use the aws-sdk-go package to upload files under a given directory. The complete source code for the snippet is available here https://github.com/abvarun226/blog-source-code/tree/master/uploading-files-to-aws-s3-using-go

In order to test the snippet, we will use localstack to run s3 emulator in a docker container on the laptop. The container exposes s3 endpoint on port 4566. The snippet will then create a new bucket work-with-s3 in s3. The snippet will then upload couple of files to blog directory under work-with-s3 bucket.

About

Bharghava Varun Ayada is a Staff Software Engineer at Walmart Labs, living in Bangalore, India. This blog is about software engineering, system design, distributed systems and DevOps.


Github / Twitter / LinkedIn / Dev.to / Stackoverflow


Recommended Books
Designing Data-Intensive Applications / Staff Engineer / Building Microservices / Site Reliability Engineering

Get new posts by email