Quantcast
Channel: ProgrammableWeb - Node.js
Viewing all articles
Browse latest Browse all 1601

How to Launch an API With Amazon’s Lambda and API Gateway

$
0
0
Primary Target Audience: 
Primary Channel: 
Primary category: 
Related Companies: 
Product: 
Headline on Actual Article : 
How To Build An API In 10 Minutes

AWS Lambda is the service that automates the running of code using the AWS infrastructure, creating a highly available and reliable Web service that is secure and scales as needed, removing the need for a full-stack solution to run just a few lines of code. Its event-driven design allows each AWS service to log an event, such as an API call, and trigger an action, such as run a predefined script.

As an example, if you wanted to upload multiple images from a Web app to your S3 bucket, and then run a conversion once uploaded to turn them into thumbnails, the problem sounds simple but the solution is fairly complex. It involves provisioning machines to handle the requests,
implementing a queuing system to store the jobs, provisioning more machines to perform the conversions, and deploying code to each machine multiple times.

AWS Lambda streamlines the entire process by tying the code to the data as it uploads to the cloud. Each event triggers the subsequent action with resources automatically handled in the background, so there is no need manage each individual process. In this tutorial on ReadWrite, Pete Gamache guides followers through building a simple request handler that leverages Lambda and AWS API Gateway to make development quick and easy.

The first step is to write the request handler in JavaScript, which relies on a working Node.js installation, before zipping the code for importing to Lambda. Followers are then guided through setting up and testing the Lambda, before creating the API and its method in API Gateway.

The author also provides several tips and tricks to ease development, but all of the code is provided and simply copy/pasting all of it should have your API up and running in around 10 minutes.

Summary: 
Amazon web Services’ Lambda dramatically streamlines event-based programming in the Amazon infrastructure by automating the running of code based on triggers generated by events within S3 services. This tutorial uses Lambda and API Gateway to build a simple request handler in around 10 minutes.
Secondary category: 
Related Languages: 
URL To Article: 
http://readwrite.com/2015/11/16/how-to-build-an-api-amazon-lambda
Name of Host Site: 
ReadWrite
URL To Home Page of Host Site: 
http://readwrite.com/

Viewing all articles
Browse latest Browse all 1601

Trending Articles