paint-brush
AWS: Creating APIs Using Go Part1by@harrison_brock

AWS: Creating APIs Using Go Part1

by Harrison BrockJanuary 12th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Over the next few months, I will be writing about how to use AWS and Go to create web applications. For this first post, I’m going to be writing about how to develop microservices using Go, AWS Lambda Functions, the AWS API Gateway, and DymanoDB.

Company Mentioned

Mention Thumbnail
featured image - AWS: Creating APIs Using Go Part1
Harrison Brock HackerNoon profile picture

AWS: Creating APIs Using Go Part 1

AWS AndDymanoDB Setup

Over the next few months, I will be writing about how to use AWS and Go to create web applications. For this first post, I’m going to be writing about how to develop microservices using Go, AWS Lambda Functions, the AWS API Gateway, and DymanoDB.

What Are We Going To Build?

We are going to be building a simple contact/address book application. This will allow the end-user to create a new contact, view contacts, search for contacts, edit contacts, and delete contacts.

But in this first post, we will only be setting up AWS account and creating our database.

Signing Up For AWS Free-Tier Account

I’m not going to walk you through how to signup for an AWS because this is a well-documented process. You can use this link to set up your account.

Setup AWS CLI

Before installing AWS you should create a new account for yourself and download your security credentials.

You can find information here about how to install AWS CLI on your platform here.

Create The Contacts Table

We will be using DymanoDB for our database. To create a new table login the AWS console and search for DymanoDB from the list of services.

After selecting DyanamoDB click, the create table button. This will bring up a page to create a new table. Enter a table name of contacts and enter the name ID for the Partition key and select String from the dropdown list of datatypes.

After this click the create button.

Add Items To The Database

To create a new item select the new Items and click the create item button.

For our contact item, we want an id, name, phone, email company and title values. Enter values like in the image below and click the save button.

You should create a few more test records using the steps above.

Conclusion

In this first post, we cover how to set up AWS and how to create a DymanoDB table to hold our contacts. In the upcoming posts, I will cover how to create functions to add, get, and remove data from the database.

Originally published at harrisonbrock.com