Movatterモバイル変換


[0]ホーム

URL:


Packt
Search iconClose icon
Search icon CANCEL
Subscription
0
Cart icon
Your Cart(0 item)
Close icon
You have no products in your basket yet
Save more on your purchases!discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Profile icon
Account
Close icon

Change country

Modal Close icon
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timerSALE ENDS IN
0Days
:
00Hours
:
00Minutes
:
00Seconds
Home> Cloud & Networking> Serverless> AWS Lambda Quick Start Guide
AWS Lambda Quick Start Guide
AWS Lambda Quick Start Guide

AWS Lambda Quick Start Guide: Learn how to build and deploy serverless applications on AWS

Arrow left icon
Profile Icon Klems
Arrow right icon
$22.99$25.99
Full star iconFull star iconFull star iconFull star iconFull star icon5(1 Ratings)
eBookJun 2018184 pages1st Edition
eBook
$22.99 $25.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$22.99 $25.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature iconInstant access to your Digital eBook purchase
Product feature icon Download this book inEPUB andPDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature iconDRM FREE - Read whenever, wherever and however you want
OR

Contact Details

Modal Close icon
Payment Processing...
tickCompleted

Billing Address

Table of content iconView table of contentsPreview book icon Preview Book

AWS Lambda Quick Start Guide

Exploring the Serverless Framework

In the previous chapter, we learned how to use the AWS Management Console to create Lambda functions and APIs. Now, we will use the Serverless framework to programmatically create APIs and Lambda functions. We will use the serverless command-line interface to deploy and test our functions. This will tremendously speed up our development processes.

The termserverless generally refers to applications that make heavy use of third-party cloud services, such as AWS Lambda. These services are also sometimes referred to as cloud functions, serverless microservices, or serverless functions. This doesn't mean that there are no servers involved anymore, just that you haven't installed to manage and operate these servers yourself. This is handled by the cloud provider, who takes care of things like scalability, high availability, security, performance...

The Serverless framework

Here, we are going to take a look at the Serverless framework documentation. We will then take a look at how to install it, and then we'll try out our first commands.

Go to the main landing page of the Serverless framework,serverless.com.

To find all the information that you need, click onQuick Start Docs. For now, let's take a quick look at the installation section. The first thing that you need to have installed is Node.js, and you will find some information on how to install it on your local machine. For programmingserverless, we need Node.js version 4 or higher. If you don't have Node.js already, please do so now, and then resume.

Serverless runs on Node 4 or higher. For installing, go to the official Node.js website, download, and follow the installation instructions. If you want to see if Node has been installed successfully, just...

Creating a serverless project

In the previous section, we installed the Serverless framework and tried out the command line. Now, let's create our first serverless project. We are going to use the Serverless framework to create a simple Node.js lambda function and a REST API. Open Terminal and create a directory where you can place your serverless project files. I named itapp, but you can name it whatever you want. Go to that directory and open your preferred IDE. I used the Atom editor. When the Atom editor was opened in my empty directory, I used an Atom package at terminal plus to open a new Terminal window inside my IDE. This makes it easier because I don't need to switch between writing code and typing in commands. So, let's type in a command to scaffold a serverless service:

serverless create --template aws-nodejs

The command for creating a service is created...

Programming a Lambda function with Node.js

Now, let's learn a little bit more about programming Lambda functions with Node.js. We are going to take a closer look at the function handler, and in particular its arguments, that is:

  • Event objects
  • Context objects
  • Callback objects

Open thehandler.js file and delete the code that's in the function body. One way to learn about the event and context object would be to log them out on the console:

'use strict';
module.exports.hello = (event, context, callback) => {
console.log('event is', event);
};

Let's see what this gives us.

I am invoking the function locally to see what the output is with the function name set ashello:

sls invoke local -f hello
event is

Ok, my event, apparently, is null. Let's see what the context is, as shown next:

module.exports.hello = (event, context, callback) =&gt...

Testing and debugging Lambda functions

In the previous section, we learned about programming Lambda function handlers. Now, let's explore testing and debugging.

Here, we are going to look at three different testing and debugging approaches:

  • Using the Serverless framework
  • Using Postman for testing our API
  • Using the AWS Management Console

Let's go back to ourhandler.js file from the previous section. There are a couple things that should be changed. The response method should be changed back to something that our API can work with.

Give it abody property with astringify JSON content, as shown here:

body: JSON.stringify({

And, in the JSON content, get back the event in the remaining time from the context, and then, instead of returning an error, we will return the response:

'use strict';
module.exports.hello = (event, context, callback) => {
let remainingTime...
Download code iconDownload Code

Key benefits

  • Learn to write, run, and deploy Lambda functions in the AWS cloud
  • Make the most of AWS Lambda functions to build scalable and cost-efficient systems
  • A practical guide to developing serverless services and applications in Node.js, Java, Python, and C#

Description

AWS Lambda is a part of AWS that lets you run your code without provisioning or managing servers. This enables you to deploy applications and backend services that operate with no upfront cost. This book gets you up to speed on how to build scalable systems and deploy serverless applications with AWS Lambda.The book starts with the fundamental concepts of AWS Lambda, and then teaches you how to combine your applications with other AWS services, such as AmazonAPI Gateway and DynamoDB. This book will also give a quick walk through on how to use the Serverless Framework to build larger applications that can structure code or autogenerate boilerplate code that can be used to get started quickly for increased productivity.Toward the end of the book, you will learn how to write, run, and test Lambda functions using Node.js, Java, Python, and C#.

Who is this book for?

This book is primarily for IT architects and developers who want to build scalable systems and deploy serverless applications with AWS Lambda. No prior knowledge of AWS is necessary.

What you will learn

  • •Understand the fundamental concepts of AWS Lambda
  • •Get to grips with the Serverless Framework and how to create a serverless project
  • •Testing and debugging Lambda functions
  • •Create a stateful, serverless backend with DynamoDB
  • •Program AWS Lambda with Java, Python, and C#
  • •Program a lambda function with Node.js

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date :Jun 29, 2018
Length:184 pages
Edition :1st
Language :English
ISBN-13 :9781789340600
Concepts :

What do you get with eBook?

Product feature iconInstant access to your Digital eBook purchase
Product feature icon Download this book inEPUB andPDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature iconDRM FREE - Read whenever, wherever and however you want
OR

Contact Details

Modal Close icon
Payment Processing...
tickCompleted

Billing Address

Product Details

Publication date :Jun 29, 2018
Length:184 pages
Edition :1st
Language :English
ISBN-13 :9781789340600
Category :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99billed monthly
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconSimple pricing, no contract
$199.99billed annually
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconChoose a DRM-free eBook or Video every month to keep
Feature tick iconPLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick iconExclusive print discounts
$279.99billed in 18 months
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconChoose a DRM-free eBook or Video every month to keep
Feature tick iconPLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick iconExclusive print discounts

Frequently bought together


AWS Lambda Quick Start Guide
AWS Lambda Quick Start Guide
Read more
Jun 2018184 pages
Full star icon5 (1)
eBook
eBook
$22.99$25.99
$32.99
AWS Certified Solutions Architect ??? Associate Guide
AWS Certified Solutions Architect ??? Associate Guide
Read more
Oct 2018626 pages
Full star icon3.4 (7)
eBook
eBook
$35.98$39.99
$48.99
Mastering AWS Lambda
Mastering AWS Lambda
Read more
Aug 2017300 pages
Full star icon2 (1)
eBook
eBook
$35.98$39.99
$48.99
Stars icon
Total$130.97
AWS Lambda Quick Start Guide
$32.99
AWS Certified Solutions Architect ??? Associate Guide
$48.99
Mastering AWS Lambda
$48.99
Total$130.97Stars icon

Table of Contents

7 Chapters
Getting Started with AWSChevron down iconChevron up icon
Getting Started with AWS
Installation and setup guide
Introduction to AWS
AWS Management Console
AWS Lambda
AWS API Gateway
Summary
Exploring the Serverless FrameworkChevron down iconChevron up icon
Exploring the Serverless Framework
The Serverless framework
Creating a serverless project
Programming a Lambda function with Node.js
Testing and debugging Lambda functions
Summary
Building a Serverless ApplicationChevron down iconChevron up icon
Building a Serverless Application
Building a stateless serverless web application backend
Creating a stateful serverless backend with DynamoDB
Creating a web client
Deploying a serverless frontend on CloudFront
Summary
Programming AWS Lambda with JavaChevron down iconChevron up icon
Programming AWS Lambda with Java
Deploying and Testing AWS Lambda Functions
Lambda Function with S3 Event Input
Summary
Programming AWS Lambda with PythonChevron down iconChevron up icon
Programming AWS Lambda with Python
Creating a python lambda function
Using the Serverless Framework with Python
Building a Serverless backend with Python
Summary
Programming AWS Lambda with C#Chevron down iconChevron up icon
Programming AWS Lambda with C#
Creating C# Lambda functions with .NETCore
Creating C# Serverless Project with .NET Core
Summary
Other Books You May EnjoyChevron down iconChevron up icon
Other Books You May Enjoy
Leave a review - let other readers know what you think

Recommendations for you

Left arrow icon
Solutions Architect's Handbook
Solutions Architect's Handbook
Read more
Mar 2024582 pages
Full star icon4.7 (60)
eBook
eBook
$42.99$47.99
$59.99
Mastering Terraform
Mastering Terraform
Read more
Jul 2024506 pages
Full star icon5 (20)
eBook
eBook
$35.98$39.99
$49.99
The Ultimate Linux Shell Scripting Guide
The Ultimate Linux Shell Scripting Guide
Read more
Oct 2024696 pages
Full star icon4.8 (5)
eBook
eBook
$35.98$39.99
$49.99
Mastering PowerShell Scripting
Mastering PowerShell Scripting
Read more
May 2024826 pages
Full star icon5 (27)
eBook
eBook
$35.98$39.99
$49.99
Kubernetes – An Enterprise Guide
Kubernetes – An Enterprise Guide
Read more
Aug 2024682 pages
Full star icon4.8 (13)
eBook
eBook
$38.99$43.99
$54.99
The Self-Taught Cloud Computing Engineer
The Self-Taught Cloud Computing Engineer
Read more
Sep 2023472 pages
Full star icon5 (180)
eBook
eBook
$35.98$39.99
$49.99
CI/CD Design Patterns
CI/CD Design Patterns
Read more
Dec 2024356 pages
eBook
eBook
$27.99$31.99
$39.99
Platform Engineering for Architects
Platform Engineering for Architects
Read more
Oct 2024374 pages
Full star icon5 (2)
eBook
eBook
$35.98$39.99
$49.99
Microsoft Azure Fundamentals Certification and Beyond
Microsoft Azure Fundamentals Certification and Beyond
Read more
Jan 2024284 pages
Full star icon4.8 (29)
eBook
eBook
$31.99$35.99
$44.99
Right arrow icon

Customer reviews

Rating distribution
Full star iconFull star iconFull star iconFull star iconFull star icon5
(1 Ratings)
5 star100%
4 star0%
3 star0%
2 star0%
1 star0%
AlainApr 25, 2024
Full star iconFull star iconFull star iconFull star iconFull star icon5
Very useful resource, practical, well written, hands-on
Subscriber reviewPackt

People who bought this also bought

Left arrow icon
Mastering Ubuntu Server
Mastering Ubuntu Server
Read more
Sep 2022584 pages
Full star icon4.7 (43)
eBook
eBook
$38.99$43.99
$54.99
Mastering Kubernetes
Mastering Kubernetes
Read more
Jun 2023746 pages
Full star icon4.5 (47)
eBook
eBook
$38.99$43.99
$54.99
Ansible for Real-Life Automation
Ansible for Real-Life Automation
Read more
Sep 2022480 pages
Full star icon3.9 (7)
eBook
eBook
$29.99$33.99
$41.99
AWS for Solutions Architects
AWS for Solutions Architects
Read more
Apr 2023696 pages
Full star icon4.3 (64)
eBook
eBook
$38.99$43.99
$54.99
Right arrow icon

About the author

Profile icon Klems
Klems
Markus Klems is a software development and system administration expert for scalable, high-availability, and high-performance software systems, such as big data, mobile, web application, and Software-as-a-Service systems. Within the framework of his research and development work at TU Berlin and Karlsruhe Institute of Technology (KIT), Markus has gained in-depth knowledge and experience of complex and large-scale IT systems. He has been working with Amazon Web Services (AWS) since 2008 and is particularly excited about serverless computing and serverless microservice architectures.
Read more
See other products by Klems
Getfree access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook?Chevron down iconChevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website?Chevron down iconChevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook?Chevron down iconChevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support?Chevron down iconChevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks?Chevron down iconChevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook?Chevron down iconChevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.


[8]ページ先頭

©2009-2025 Movatter.jp