#CHECK LOCAL DYNAMODB HOW TO#
Now, in order to consume the DynamoDB service in a local environment we can do it by console, but why not do it with a programming language like Golang, we will learn how to do it: Access to DynamoDB with Golangįirst we are going to talk about our DB, DynamoDB is a non-relational database, for the example we are going to save two columns, Key and Value, thus approving a table that will allow us to store and consult parameters. With this we will have our AWS services ready to be consumed. To initialize it, it will be necessary: $ localstack start The localstack installation will be done through brew, with brew a docker image will be downloaded that will contain a mock up of the AWS services.
#CHECK LOCAL DYNAMODB INSTALL#
DynamoDB will be accessed through: Install Localstack
![check local dynamodb check local dynamodb](https://i.ytimg.com/vi/7Wi4k0qVNHw/maxresdefault.jpg)
This is achieved by provisioning LocalStack + Docker, AWS services will be dockerized and ready to be used through an endpoint, e.g. To begin, let’s talk about LocalStack, LocalStack is a tool that will allow us to emulate AWS services in a local environment, till the date localstack in its free version allows us to use DynamoDB locally among others services.
![check local dynamodb check local dynamodb](https://miro.medium.com/max/1400/1*_Gz8OL35lME0jYiyfNc3GA.png)
To learn how to use LocalStack we are going to implement a REST microservice developed with the Golang programming language, the objective of this API will be to insert and query data in DynamoDB without using the AWS cloud. It is a fantastic tool to visualise and manipulate data whether you are using dynamodb-local, dynalite or localstack.
![check local dynamodb check local dynamodb](https://raw.githubusercontent.com/tongueroo/jets-dynamodb-example/master/screenshots/dynamodb-admin-check-test.png)
The good news is that we have a solution to achieve this, its name is localstack, this tool will allow us to generate a local environment quickly without worrying about the time it takes to create the infrastructure and the expenses generated by the use of AWS services. dynamodb-admin is a Graphical User Interface (GUI) for DynamoDB running locally. Many times we need to test an AWS service without spending our time in infrastructure and without having to incur in expenses, we must have a tool that allows us to create a local environment and thus be able to perform the necessary tests in a homologous way as we do in our cloud provider, in this case, AWS Services. Trust me ? zero cost for using AWS Cloud Services, let’s get started ! AWS and Localstack In this post I invite you to build an API with Golang programming language and use the DynamoDB service.