Serverless Golang API with AWS Lambda

AWS announced few days ago that Go is now a supported language for AWS Lambda. This seemed like a great opportunity to get my hands dirty by creating a Go serverless application — and deploying it to Lambda.The application uses a serverless Lambda function written in Go to discover new movies by genres — using the free TMDb API. To access the function, I’ll also walk you through how to create a simple front-end using Angular 5.Note: The full source code for this application can be found on GitHubLet’s get startedThe first step involves installing these two dependencies:go get # for handler registrationgo get # for unit testsThen use the following code to create a main.go file:The handler function uses the movie genre ID as a parameter to query the TMDb API — an awesome free API for Movies and TV Shows — and returns a list of movies. The handler is registered using the lambda.Start() method.Testing the handlerTo

Original URL:

Original article

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: